[SERVER-29716] Keystring-encode ResumeTokens to allow bytewise comparisons Created: 19/Jun/17 Updated: 30/Oct/23 Resolved: 09/Oct/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Spencer Brody (Inactive) | Assignee: | Matthew Russotto |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Sprint: | Repl 2017-10-02, Repl 2017-10-23 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||
| Description |
|
Change notification ResumeTokens are composed of the logical time timestamp, the fully qualified collection name, and the document key of the changed document. In the initial version, these three components will just be fields of a BSON object, and comparisons inside the server for relative ordering will use BSON's woCompare() function. If instead we keystring-encoded that document, then the ResumeTokens become truly opaque blobs which forces users and drivers not to rely on their current format or try to inspect them. It also could give us a performance win since now the internal comparisons the server must do to put notifications in order can be bytewise comparisons instead of needing woCompare(). |
| Comments |
| Comment by Githook User [ 09/Oct/17 ] |
|
Author: {'email': 'matthew.russotto@10gen.com', 'name': 'Matthew Russotto', 'username': 'mtrussotto'}Message: |
| Comment by Matthew Russotto [ 09/Oct/17 ] |
|
Reopening to fix issue with unittests on ARM |
| Comment by Matthew Russotto [ 05/Oct/17 ] |
|
This relaxes the requirements on the drivers to return the resume token in the same order and with the same UUID format as it is sent from the server. |
| Comment by Githook User [ 05/Oct/17 ] |
|
Author: {'email': 'matthew.russotto@10gen.com', 'name': 'Matthew Russotto', 'username': 'mtrussotto'}Message: |
| Comment by Spencer Brody (Inactive) [ 20/Sep/17 ] |
|
Turns out this is required to work around the fact that some drivers don't preserve field ordering of BSON objects, and thus could re-order the shard key in the resumeToken, which would prevent resumability from working properly. |
| Comment by Spencer Brody (Inactive) [ 19/Jun/17 ] |
|
This ticket is a nice-to-have and shouldn't be considered a requirement to complete the change notification project. |