-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Product Performance
-
ALL
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Updating many fields of a wide document (an object with a large number of sibling fields) is O(n^2) in the number of fields, because each targeted field is located with an independent linear mutablebson::Element::findFirstChildNamed() scan over the same sibling chain.
This proposal adds a per-apply(), target-only field-name index so those repeated lookups become O(1), reducing the overall cost from O(n^2) to O
. It is guarded by a runtime-tunable threshold (default off), only applies to object nodes, and does not change update semantics.
Measured on a 3-node replica set with YCSB (100k docs, 5000 fields/doc), throughput improves by roughly 1.5x–11x across the tested lookup-cost-equivalent scenarios (larger updates benefit more), and the dominant CPU symbol findFirstChildNamed disappears from the profile.
- is related to
-
SERVER-130410 Allow disabling (or independently selecting) wire compression on the replication (sync-source) connection, decoupled from the client-facing listener controlled by net.compression.compressors.
-
- Backlog
-