-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sync2: advance OrderedSet on timer (#6559)
## Motivation `OrderedSet` is bound to a "snapshot" of its table, which is bounded by max `rowid` value. In order for `OrderedSet` to ingest newly added rows, its `Advance()` method must be called, which, in case of `DBSet`, updates the underlying `FPTree` with freshly added entries, which it discovers by selecting items with `rowid` > `maxSnapshotRowID`. Before this change, `Advance()` was being called after each peer sync, including both incoming sync requests handled by the server and requests initiated by active sync, no matter whether any new items were received. This was causing some unnecessary database access activity which can be avoided.
- Loading branch information
Showing
4 changed files
with
119 additions
and
60 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
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