Open ghost opened 3 years ago
Are these users in different machines/toolbox instances?
Edit: Well obviously they are. This should be easy to solve.
In this case they were on different machines.
What about the uncommitted changes in the editor that's pressing "Refresh"? How should we merge them with the changes made to the db by the other editor?
What about the uncommitted changes in the editor that's pressing "Refresh"? How should we merge them with the changes made to the db by the other editor?
I suppose the expected behavior would be to see the the changes made by someone else and keep your own changes as uncommitted. That may be difficult in practice.
I think it's possible to save the session and then merge it back after refreshing, but there might be conflicts. My question is more about what to do with the conflicts? Say I added an object to class unit
and then the other editor renamed unit
to something_else
. Any ideas? Otherwise we can just ignore conflicts which in this example, probably means that the unit
class is reinstated with that only object...
Handling those conflicts would require referential integrity between diff and regular tables. I think it sounds too much work (and might have serious problems) and we should just live with the possible conflicts until there are resources for a sound re-think. Probably should go into "roadmap".
Handling those conflicts would require referential integrity...
It can be done without ref. integrity, just by looking at names. We have all the api to do it so maybe we can try that, and if it becomes too confusing for the user (which I'm afraid it might), we just prompt them and tell them that refreshing will discard their dirty changes.
we should just live with the possible conflicts
So by living with them you mean discarding them, right?
Steps to reproduce: 1) Two people have the DB editor open to the same MySQL database 2) Other modifies database and commits 3) Other refreshes
Result: DB editor view is not updated with the modifications after refresh.
Expected: The modifications would be shown in the other user’s db editor view.