[SERVER-81295] Cannot resume V2 changeStream pipelines with V1 resume tokens Created: 21/Sep/23 Updated: 22/Jan/24 Resolved: 30/Oct/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 6.0.10, 7.0.2, 7.1.0-rc4 |
| Fix Version/s: | 7.1.1, 7.2.0-rc0, 6.0.12, 7.0.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Romans Kasperovics | Assignee: | Romans Kasperovics |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Backport Requested: |
v7.1, v7.0, v6.0
|
||||||||||||||||||||
| Sprint: | QE 2023-10-02, QE 2023-10-16, QE 2023-10-30, QE 2023-11-13 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||
| Description |
|
With PM-2677 backported to v6.0, change stream pipelines containing the $changeStreamSplitLargeEvent stage generate V2 resume tokens by design. Customers should be able to add this new stage to their existing change stream pipelines and resume using the existing V1 resume tokens, which is v6.0's default. Currently, there is a bug in compareAgainstClientResumeToken() resulting in ChangeStreamFatalError: cannot resume stream; the resume token was not found. |
| Comments |
| Comment by Githook User [ 09/Nov/23 ] |
|
Author: {'name': 'Romans Kasperovics', 'email': 'romans.kasperovics@mongodb.com', 'username': 'romanskas'}Message: Change stream implementation assumes change events are totally ordered by event '_id', which also serves as a resume token. In server versions prior to v7.0 the default resume token version is v1. Starting from v7.0 the default resume token version is v2, but the server still supports clients supplying v1 resume tokens (e.g., after server upgrade). The token version is a part of a token and all v1 tokens sort before v2 tokens. To ensure the correct event ordering, the server from v7.0 generates v1 tokens to be compared with the client's v1 token until the referred event is either located or surpassed. In this commit we fix the following issues:
|
| Comment by Githook User [ 07/Nov/23 ] |
|
Author: {'name': 'Romans Kasperovics', 'email': 'romans.kasperovics@mongodb.com', 'username': 'romanskas'}Message: Change stream implementation assumes change events are totally ordered by event '_id', which also serves as a resume token. In server versions prior to v7.0 the default resume token version is v1. Starting from v7.0 the default resume token version is v2, but the server still supports clients supplying v1 resume tokens (e.g., after server upgrade). The token version is a part of a token and all v1 tokens sort before v2 tokens. To ensure the correct event ordering, the server from v7.0 generates v1 tokens to be compared with the client's v1 token until the referred event is either located or surpassed. In this commit we fix the following issues:
|
| Comment by Githook User [ 03/Nov/23 ] |
|
Author: {'name': 'Romans Kasperovics', 'email': 'romans.kasperovics@mongodb.com', 'username': 'romanskas'}Message: Change stream implementation assumes change events are totally ordered by event '_id', which also serves as a resume token. In server versions prior to v7.0 the default resume token version is v1. Starting from v7.0 the default resume token version is v2, but the server still supports clients supplying v1 resume tokens (e.g., after server upgrade). The token version is a part of a token and all v1 tokens sort before v2 tokens. To ensure the correct event ordering, the server from v7.0 generates v1 tokens to be compared with the client's v1 token until the referred event is either located or surpassed. In this commit we fix the following issues: When resuming from the event within a transaction we need to consider 'txnOpIndex', because the whole transaction gets the same timestamp. |
| Comment by Githook User [ 29/Oct/23 ] |
|
Author: {'name': 'Romans Kasperovics', 'email': 'romans.kasperovics@mongodb.com', 'username': 'romanskas'}Message: Change stream implementation assumes change events are totally The token version is a part of a token and all v1 tokens sort before In this commit we fix the following issues:
|