Details
-
Improvement
-
Resolution: Won't Fix
-
Major - P3
-
None
-
None
-
None
-
Replication
Description
Add an runtime ServerParameter to allow annotating fan-out operations in the oplog.
For any fan-out (multi-update/remove) we can add an operation-id to each oplog entry which results from that operation as executed on the primary. In addition we would log a no-op oplog entry with the orig. query+update ( with only the operations and their paths so we don't log the orig data completely).
With this information in the oplog we can easily detect inefficiencies in the replication process or costly operations via replication. This would also allow more explicit understanding of the root operation and its effects via replication.
Here is an example oplog sequence in this mode:
|
|
{ts:..., h:..., op:"n", o2:{counter:{$lt:100}}, |
o:[
|
{$push:{"a.b" : undefined}}, |
{$inc:{"counter": undefined, version: undefined}], |
opid:123123} |
|
|
{ts:..., h:..., op:u, o2:{_id:y},
|
o:{$set:{counter:56, version:3, "a.7" :{...}}} |
opid:123123} |
{ts:..., h:..., op:u, o2:{_id:x},
|
o:{$set:{counter:200, version:12, "a.12" :{...}}} |
opid:123123} |