From 8e1ee45489de7014d995bfb161fba15fa2484958 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 30 May 2026 15:49:18 +0800 Subject: [PATCH] rgw/posix: fix event replay in BucketCache ev_loop evec is never cleared after each n->notify() call, so events accumulate across iterations of ev_loop's inner for loop. Each notify() call receives not just the current event but all events dispatched in earlier iterations too. Add evec.clear() after each n->notify() call. Signed-off-by: Kefu Chai --- src/rgw/driver/posix/notify.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rgw/driver/posix/notify.h b/src/rgw/driver/posix/notify.h index bdfd5ec582a..d840932f8bd 100644 --- a/src/rgw/driver/posix/notify.h +++ b/src/rgw/driver/posix/notify.h @@ -204,6 +204,7 @@ namespace file::listing { } /* !overflow */ if (evec.size() > 0) { n->notify(watch_name, watch_opaque, evec); + evec.clear(); } } /* events */ } /* n > 0 */ -- 2.47.3