Skip to content

Commit

Permalink
core: ci skip: add random inline test for suspicion
Browse files Browse the repository at this point in the history
  • Loading branch information
flowerinthenight committed Sep 17, 2024
1 parent f7e5244 commit 7afc6b1
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/zgroup.zig
Original file line number Diff line number Diff line change
Expand Up @@ -574,17 +574,17 @@ pub fn Fleet() type {
log.debug("[{d}] ack from {s}", .{ i, ping_key });

// TEST: start
// if (i == 10) {
// log.debug("[{d}] --- trigger suspect for {s}", .{ i, ping_key });
// self.isd_mtx.lock();
// defer self.isd_mtx.unlock();
// try self.isd_queue.append(.{
// .key = ping_key,
// .state = .suspected,
// .incarnation = 0,
// .isd_cmd = .suspect,
// });
// }
if (i > 0 and i <= 100 and @mod(i, 20) == 0) {
log.debug("[{d}] --- trigger suspect for {s}", .{ i, ping_key });
self.isd_mtx.lock();
defer self.isd_mtx.unlock();
try self.isd_queue.append(.{
.key = ping_key,
.state = .suspected,
.incarnation = 0,
.isd_cmd = .suspect,
});
}
// TEST: end
},
}
Expand Down

0 comments on commit 7afc6b1

Please sign in to comment.