Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
None
-
Query Execution
Description
Currently classed PlanStageData and RuntimeEnvironment have debugString() methods:
However, they have different signatures:
std::string debugString() andÂ
void debugString(StringBuilder*).
RuntimeEnvironment is accepting StringBuilder to avoid extra allocations when serializing it in PlanStageData::debugString().
What we should do is:
- Add serialize(fmt::memory_buffer&) method to both functions. This way they can be serialized to already existing buffer, avoiding allocations and this signature is supported by LOGV2: https://github.com/mongodb/mongo/blob/master/src/mongo/logv2/attribute_storage.h#L173
- Add std::string debugString() to both classes, implementing it via serialize(). This way we can keep old signature.