From f2c1cd6792b45f04968d3c3d335723430be2e6a9 Mon Sep 17 00:00:00 2001 From: Steve Atherton Date: Sun, 23 Oct 2022 01:45:04 -0700 Subject: [PATCH] Bug fix: If a disk queue reader drops its future memory corruption could occur so the actor is made uncancellable and the TrackMe member will keep the disk queue alive until it finishes. --- fdbserver/DiskQueue.actor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdbserver/DiskQueue.actor.cpp b/fdbserver/DiskQueue.actor.cpp index 40342945b6..d0faad574d 100644 --- a/fdbserver/DiskQueue.actor.cpp +++ b/fdbserver/DiskQueue.actor.cpp @@ -743,7 +743,10 @@ public: } // Read nPages from pageOffset*sizeof(Page) offset in file self->files[file] - ACTOR static Future> read(RawDiskQueue_TwoFiles* self, int file, int pageOffset, int nPages) { + ACTOR static UNCANCELLABLE Future> read(RawDiskQueue_TwoFiles* self, + int file, + int pageOffset, + int nPages) { state TrackMe trackMe(self); state const size_t bytesRequested = nPages * sizeof(Page); state Standalone result = makeAlignedString(sizeof(Page), bytesRequested);