[SERVER-77826] Consider hashing eventIdentifier in resume token Created: 06/Jun/23 Updated: 07/Jun/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Bernard Gorman | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Query Execution
|
| Participants: |
| Description |
|
The eventIdentifier field in a change stream resume token is currently encoded as the raw documentKey or operationDescription of the associated event. It is therefore of indeterminate size, and since resume tokens are repeated several times in a batch of results (_id, sort key, postBatchResumeToken) this places some constraints on the maximum size of an event. For the telemetry and query settings projects, we have opted to encode query shape as a SHA-256 hash, considering this sufficient to avoid collisions. We should consider doing the same for eventIdentifier. |