-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Trivial - P5
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
None
-
3
-
TBD
-
None
-
None
-
None
-
None
-
None
-
None
-
None
We have tests for Mongosync that test our handling of BSONObjectTooLarge errors while reading the change stream. Some of those tests create documents with very large _id fields (c. 4MB).
These can trigger ChangeStreamFatalError from the Server. Those errors contain the entire _id value in the error string. For these huge _id values, that ends up leading to a 4MB+ error message.
I'm not sure what the best way to handle this is. My inclination is to suggest that there should be some sort of truncation applied to document field contents, wherever a field's content is directly included in an error string. I think something like {{begins with "8268081F7E000000012B042C0100296E5A10 ... <total content length is 420000 bytes>" would be good.
I'm calling out this specific error, but ideally this would be done everywhere.