[SERVER-50319] [SBE] Implement truncation of large values for logging Created: 14/Aug/20  Updated: 29/Oct/23  Resolved: 15/Jun/21

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 4.5.1
Fix Version/s: 5.1.0-rc0

Type: Task Priority: Major - P3
Reporter: Eric Cox (Inactive) Assignee: Adi Agrawal
Resolution: Fixed Votes: 0
Labels: qexec-team, sbe-post-v1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
depends on SERVER-51602 writeValueToStream() should truncate ... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Query Execution 2021-06-14, Query Execution 2021-06-28
Participants:

 Description   

The goal of this task is to update writeValueToStream() to do the following:
(1) Truncate arrays and objects if they exceed a certain depth and/or if they exceed a certain number of elements/fields; and
(2) Truncate bsonRegex's and bsonJavascript's if they exceed a certain length.

We need to figure out what specific scheme we want to use for truncating arrays and objects. One option is to implement a scheme similar to what BSONElement::toString() does.

(For bonus points, it would be nice to also fix writeValueToStream() so that it actually prints out the contents of a jsFunction instead of just printing out "jsFunction".)



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 15/Jun/21 ]

Author:

{'name': 'Adityavardhan Agrawal', 'email': 'adi.agrawal@mongodb.com'}

Message: SERVER-50319 Implement truncation of large values for logging in SBE
Branch: master
https://github.com/mongodb/mongo/commit/214defdb236b3620806d7ce3b2d9eb485d68cd89

Comment by Eric Cox (Inactive) [ 07/Jun/21 ]

kyle.suarez I can start work on this ticket this week.

Comment by Kyle Suarez [ 28/May/21 ]

eric.cox, please take a look a this next sprint, or let me know if you're preoccupied with other project work.

Comment by Drew Paroski [ 03/Nov/20 ]

anton.korshunov: No, this task is not a duplicate of SERVER-51602. While SERVER-51602 implemented truncation for strings and bindata, it didn't implement truncation for arrays and objects, so there is still work left to be done here. I've update this task's description accordingly.

Comment by Anton Korshunov [ 23/Oct/20 ]

andrew.paroski Can this ticket be closed as a duplicate of SERVER-51602?

Comment by Anton Korshunov [ 14/Oct/20 ]

bruce.lucas Yes, we need to do something different when logging execution plans. We don't want the entire plan output to be truncated because of some huge constant value appearing in the middle of the plan. Instead, we'd want to truncate this large value itself.

Comment by Bruce Lucas (Inactive) [ 13/Oct/20 ]

Assuming you're referring to the normal mongod log, logv2 has an intrinsic log line truncation mechanism - is it necessary or desirable for the query system to do some additional truncation?

Generated at Thu Feb 08 05:22:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.