File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,7 @@ pgaio_choose_idle_worker(void)
172
172
/* Find the lowest bit position, and clear it. */
173
173
worker = pg_rightmost_one_pos64 (io_worker_control -> idle_worker_mask );
174
174
io_worker_control -> idle_worker_mask &= ~(UINT64_C (1 ) << worker );
175
+ Assert (io_worker_control -> workers [worker ].in_use );
175
176
176
177
return worker ;
177
178
}
@@ -316,6 +317,7 @@ pgaio_worker_die(int code, Datum arg)
316
317
Assert (io_worker_control -> workers [MyIoWorkerId ].in_use );
317
318
Assert (io_worker_control -> workers [MyIoWorkerId ].latch == MyLatch );
318
319
320
+ io_worker_control -> idle_worker_mask &= ~(UINT64_C (1 ) << MyIoWorkerId );
319
321
io_worker_control -> workers [MyIoWorkerId ].in_use = false;
320
322
io_worker_control -> workers [MyIoWorkerId ].latch = NULL ;
321
323
LWLockRelease (AioWorkerSubmissionQueueLock );
You can’t perform that action at this time.
0 commit comments