Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made change to alleviate a bug in a multiuser environment with one ... #1126

Merged
merged 3 commits into from
Apr 25, 2016

Conversation

ScottTownsendNIST
Copy link
Contributor

…centralized database file that near simultaneous database saves may cause changes from one save to be overwritten by changes from the other. This would occur when the second user save happened while the first user save was locking the database file or saving to the tmp file but prior to the copy of the tmp file to the database file. In this case the second user save would not yet see a modified timestamp or size change in the database file and thus start the save process. The save process would wait for the file lock to be removed then overwrite the database causing the changes from the previous save to be lost. This was especially noticeable when the database file resided on a network drive with frequent network latency issues.

…nteralized database file that near simultaneous database saves may cause changes from one save to be overwritten by changes from the other. This would occur when the second user save happened while the first user save was locking the database file or saving to the tmp file but prior to the copy of the tmp file to the database file. In this case the second user save would not yet see a modified timestamp or size change in the database file and thus start the save process. The save process would wait for the file lock to be removed then overwrite the database causing the changes from the previous save to be lost. This was especially noticible when the database file resided on a network drive with frequent network latency issues.
@lenhard lenhard added this to the v3.4 milestone Apr 12, 2016
@@ -1,4 +1,6 @@
/* Copyright (C) 2003-2015 JabRef contributors.
Copyright (C) 2016 Scott Townsend
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind removing your name here? All contributors are of course listed in https://github.com/JabRef/jabref/blob/master/AUTHORS.

@tobiasdiez
Copy link
Member

Thank you very much for your contribution 👍 .
I just made some comments. Please fix these small issues and rebase, then we will merge this in.

@tobiasdiez tobiasdiez added type: enhancement status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Apr 14, 2016
sat3 added 2 commits April 25, 2016 06:49
…ided by the JabRef development team. Moved the check for external changes to the database file into it's own private method and then call that method from both the init() and the run() methods to ensure when a multiple simultaneaous saves are performed the database does not get overwritten.
@ScottTownsendNIST
Copy link
Contributor Author

Sorry to take so long to address the comments and fix the code. I had other projects that needed attention. Thank you for your consideration of my code change.

@tobiasdiez
Copy link
Member

Thanks for your revision.
LGTM 👍

@tobiasdiez tobiasdiez merged commit 2ca56d8 into JabRef:master Apr 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers type: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants