-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Replication
-
Replication, Replication - Oplog and Recovery
-
ALL
-
Repl 2026-11-09, Repl 2026-11-23
-
None
-
None
-
None
-
None
-
None
-
None
-
None
On mongod 9.0.4+ (bracket tested: clean on 8.3.13), acknowledged client inserts into a manually-created capped local.oplog.rs on a standalone node are persisted (unfiltered metadata count reflects them) but no scan returns them — find() / countDocuments / $natural all return 0 — until the mongod restarts. Restart rebuilds visibility and all entries appear. Looks like oplog visibility (OplogVisibilityManager, SERVER-106810 project area) is now advanced only through the replication write path.
Questions: (1) Is this intentional? (2) If yes, is there a supported way to read freshly-inserted oplog entries on a live standalone?
Context: an internal test suite seeds a fake oplog via direct inserts and reads it back pre-restart — that's what broke (details in a Developers Only comment). The production seeded-member flow (seed → restart with --replSet → node becomes PRIMARY, entries visible; verified end-to-end on 9.0.4 including initial sync from the seeded node) is unaffected, so this is a guidance request, not a regression report. Related: SERVER-137660 (same area — oplog entry validation / direct writes to oplog.rs).
Minimal repro: standalone mongod 9.0.4 → {{createCollection("oplog.rs",
{capped: true, size: 1073741824})}} in local → {{insertOne({op:"n", ns:"", v:2, o:
{msg:"x"}, wall: new Date(), ts: Timestamp(t,1), h: NumberLong(0), t: NumberLong(0)})}} → find() returns 0 while unfiltered metadata count returns 1 → restart mongod → entry appears. On 8.3.13 the entry is visible immediately.