-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes Shared Database: Changes filtering in CoarseChangeFilter to att…
…ribute property (#6868)
- Loading branch information
1 parent
3123090
commit a0ca875
Showing
10 changed files
with
131 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Remote Storage | ||
|
||
## Using a shared PostgreSQL database | ||
|
||
... | ||
|
||
## Handling large shared databases | ||
|
||
Synchronization times may get long when working with a large database containing several thousand entries. Therefore, synchronization only happens if several conditions are fulfilled: | ||
|
||
* Edit to another field. | ||
* Major changes have been made (pasting or deleting more than one character). | ||
|
||
Class `org.jabref.logic.util.CoarseChangeFilter.java` checks both conditions. | ||
|
||
Remaining changes that has not been synchronized yet are saved at closing the database rendering additional closing time. Saving is realized in `org.jabref.logic.shared.DBMSSynchronizer.java`. Following methods account for synchronization modes: | ||
|
||
* `pullChanges` synchronizes the database unconditionally. | ||
* `pullLastEntryChanges` synchronizes only if there are remaining entry changes. It is invoked when closing the shared database (`closeSharedDatabase`). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 19 additions & 1 deletion
20
src/main/java/org/jabref/model/database/event/BibDatabaseContextChangedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,29 @@ | ||
package org.jabref.model.database.event; | ||
|
||
import org.jabref.model.entry.event.EntriesEvent; | ||
import org.jabref.model.groups.event.GroupUpdatedEvent; | ||
import org.jabref.model.metadata.event.MetaDataChangedEvent; | ||
|
||
/** | ||
* This Event is automatically fired at the same time as {@link EntriesEvent}, {@link GroupUpdatedEvent} or {@link MetaDataChangedEvent}. | ||
*/ | ||
public class BibDatabaseContextChangedEvent { | ||
// no data | ||
// If the event has been filtered out | ||
private boolean filteredOut; | ||
|
||
public BibDatabaseContextChangedEvent() { | ||
this(false); | ||
} | ||
|
||
public BibDatabaseContextChangedEvent(boolean filteredOut) { | ||
this.filteredOut = filteredOut; | ||
} | ||
|
||
public boolean isFilteredOut() { | ||
return filteredOut; | ||
} | ||
|
||
public void setFilteredOut(boolean filtered) { | ||
this.filteredOut = filtered; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters