[SERVER-32283] Add an expression to inspect the resume token of a change stream Created: 12/Dec/17  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Charlie Swanson Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 5
Labels: tscs-ramp
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-33819 Add $decodeResumeToken expression Closed
Related
related to SERVER-34313 Change resume token format to be enco... Closed
related to SERVER-34181 Expose the "ts" value from oplog entr... Closed
is related to SERVER-55978 Add functionality to the shell to dec... Closed
Assigned Teams:
Query Execution
Participants:
Case:

 Description   

For diagnostic or scripting purposes, it might be useful to inspect the values of the different pieces of a resume token:

  • The collection's UUID
  • The timestamp of the change
  • The document key for the changed document

Cases this has come up include:

  • Writing performance tests for change streams, wanting to inspect the cluster time of each change.
  • Debugging a test failure during development on SERVER-31447.

A good way to expose this information might be through an aggregation expression.



 Comments   
Comment by Charlie Swanson [ 21/Jun/18 ]

onlyhemant2410, note that in version 4.0 each change stream document will include a "clusterTime" field with the timestamp. See SERVER-34181. We plan to ship version 4.0 this summer, as detailed here. There is a release candidate available here.

Comment by Hemant K Patel [ 20/Jun/18 ]

I am in dire need of this feature, need to know the timestamp to calculateĀ the lag in processing the chagestreamĀ events. We are an update-heavy operation and currently, there is no way to identify if we are lagging behind.

Comment by Tess Avitabile (Inactive) [ 12/Dec/17 ]

Yes, I think that was why I wanted it.

Comment by Charlie Swanson [ 12/Dec/17 ]

tess.avitabile I recall you were interested in this as well, do you remember what for? Debugging a BF?

Generated at Thu Feb 08 04:29:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.