diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-24 06:03:39 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-24 08:31:18 -0300 |
| commit | e332c4c300bd39ba9b2da797391e37ddebda5319 (patch) | |
| tree | caddbb0391e786a05c5e9de8fc3a0e251b50cbb2 | |
| parent | c90db8c04787d923bbef500eb78c68fd65715cf0 (diff) | |
| download | pardes-e332c4c300bd39ba9b2da797391e37ddebda5319.tar.gz pardes-e332c4c300bd39ba9b2da797391e37ddebda5319.zip | |
soak: a join's dump that loads as another session says the fields it differs by, as a client's join says them (replica.fromDump's words: `loadDiffers` made pub): the coordinator's merge67b release soak had 'seed 3 rtt 207 ms: client 3's dump loaded as another session' and no field (1 in 12 seed-runs), not reproduced yet
Co-Authored-By: Claude Opus <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
| -rw-r--r-- | core/replica.zig | 2 | ||||
| -rw-r--r-- | test/replicas.zig | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/core/replica.zig b/core/replica.zig index 182d25c2..48cb1838 100644 --- a/core/replica.zig +++ b/core/replica.zig @@ -3100,7 +3100,7 @@ fn loadAgain(gpa: Allocator, j: *Joined, have: ?*Have, why: []u8, session: []con /// The fields a replica loaded from the join's dump `bytes` has other than /// the session as it dumped them (the digest a field at a time the dump /// ends with: dump.joinParts), named in `out`. -fn loadDiffers(r: *Replica, bytes: []const u8, out: []u8) []const u8 { +pub fn loadDiffers(r: *Replica, bytes: []const u8, out: []u8) []const u8 { const want = pardes.dump.joinParts(r.gpa, bytes) orelse return "(the dump names no field) "; defer r.gpa.free(want); var arena: std.heap.ArenaAllocator = .init(r.gpa); diff --git a/test/replicas.zig b/test/replicas.zig index 3aa9263e..cd0a3459 100644 --- a/test/replicas.zig +++ b/test/replicas.zig @@ -1986,7 +1986,9 @@ const Soak = struct { rp.echo.now = m.at * 1000; if (!rp.loaded(cl.digest)) { s.totals.unequal += 1; - std.debug.print("seed {d} rtt {d} ms: client {d}'s dump loaded as another session\n", .{ s.r.seed, s.r.rtt_ms, m.who }); + // The fields it differs by, as a client's join says them (replica.fromDump). + var named: [400]u8 = undefined; + std.debug.print("seed {d} rtt {d} ms: client {d}'s dump loaded as another session: {s}differs\n", .{ s.r.seed, s.r.rtt_ms, m.who, replica.loadDiffers(rp, m.bytes, &named) }); } cl.live = m.gen; var j: replica.Joined = .{ .fd = cl.cfd, .pid = 0, .client = cl.id, .view = cl.view, .gmtoff = 0, .dump = &.{} }; |
