@@ -980,10 +980,10 @@ TEST_F(MB29369_SingleThreadedEPBucketTest,
980980 auto producer = createDcpProducer (cookie, IncludeDeleteTime::Yes);
981981 producer->scheduleCheckpointProcessorTask ();
982982
983- auto & lpAuxioQ = *task_executor->getLpTaskQ ()[AUXIO_TASK_IDX ];
984- EXPECT_EQ (1 , lpAuxioQ .getFutureQueueSize ()) << " Expected to have "
985- " ActiveStreamCheckpointProce "
986- " ssorTask in AuxIO Queue" ;
983+ auto & lpNonIoQ = *task_executor->getLpTaskQ ()[NONIO_TASK_IDX ];
984+ EXPECT_EQ (1 , lpNonIoQ .getFutureQueueSize ())
985+ << " Expected to have ActiveStreamCheckpointProcessorTask in NonIO "
986+ " Queue" ;
987987
988988 // Create dcp_producer_snapshot_marker_yield_limit + 1 streams -
989989 // this means that we don't process all pending vBuckets on a single
@@ -1075,11 +1075,13 @@ TEST_F(MB29369_SingleThreadedEPBucketTest,
10751075 // If the Backfilling task then runs, which returns a disk snapshot and
10761076 // re-registers the cursor; we still have an
10771077 // ActiveStreamCheckpointProcessorTask outstanding with the vb in the queue.
1078- EXPECT_EQ (2 , lpAuxioQ.getFutureQueueSize ());
1078+ EXPECT_EQ (1 , lpNonIoQ.getFutureQueueSize ());
1079+ auto & lpAuxioQ = *task_executor->getLpTaskQ ()[AUXIO_TASK_IDX];
1080+ EXPECT_EQ (1 , lpAuxioQ.getFutureQueueSize ());
10791081
10801082 // Run the ActiveStreamCheckpointProcessorTask; which should re-schedule
10811083 // due to having items outstanding.
1082- runNextTask (lpAuxioQ ,
1084+ runNextTask (lpNonIoQ ,
10831085 " Process checkpoint(s) for DCP producer test_producer" );
10841086
10851087 // Now run backfilling task.
@@ -1101,7 +1103,7 @@ TEST_F(MB29369_SingleThreadedEPBucketTest,
11011103
11021104 // Now run chkptProcessorTask to complete it's queue. With the bug, this
11031105 // results in us discarding the last item we just added to vBucket.
1104- runNextTask (lpAuxioQ ,
1106+ runNextTask (lpNonIoQ ,
11051107 " Process checkpoint(s) for DCP producer test_producer" );
11061108
11071109 // Let the backfill task complete running (it requires multiple steps to
@@ -1127,7 +1129,7 @@ TEST_F(MB29369_SingleThreadedEPBucketTest,
11271129
11281130 // Now run chkptProcessorTask to complete it's queue, this will now be able
11291131 // to access the checkpoint and get key2
1130- runNextTask (lpAuxioQ ,
1132+ runNextTask (lpNonIoQ ,
11311133 " Process checkpoint(s) for DCP producer test_producer" );
11321134
11331135 result = stream->next ();
@@ -1160,9 +1162,10 @@ TEST_P(STParamPersistentBucketTest, MB29585_backfilling_whilst_snapshot_runs) {
11601162 setVBucketStateAndRunPersistTask (vbid, vbucket_state_active);
11611163
11621164 auto & lpAuxioQ = *task_executor->getLpTaskQ ()[AUXIO_TASK_IDX];
1163- EXPECT_EQ (1 , lpAuxioQ.getFutureQueueSize ()) << " Expected to have "
1164- " ActiveStreamCheckpointProce"
1165- " ssorTask in AuxIO Queue" ;
1165+ auto & lpNonIoQ = *task_executor->getLpTaskQ ()[NONIO_TASK_IDX];
1166+ EXPECT_EQ (1 , lpNonIoQ.getFutureQueueSize ())
1167+ << " Expected to have ActiveStreamCheckpointProcessorTask in NonIO "
1168+ " Queue" ;
11661169
11671170 // Create first stream
11681171 auto vb = store->getVBucket (vbid);
@@ -1224,7 +1227,7 @@ TEST_P(STParamPersistentBucketTest, MB29585_backfilling_whilst_snapshot_runs) {
12241227
12251228 // Next we must deque, but not run the snapshot task, we will interleave it
12261229 // with backfill later
1227- CheckedExecutor checkpointTask (task_executor, lpAuxioQ );
1230+ CheckedExecutor checkpointTask (task_executor, lpNonIoQ );
12281231 EXPECT_STREQ (" Process checkpoint(s) for DCP producer test_producer" ,
12291232 checkpointTask.getTaskName ().data ());
12301233
@@ -1276,7 +1279,7 @@ TEST_P(STParamPersistentBucketTest, MB29585_backfilling_whilst_snapshot_runs) {
12761279 FAIL () << " Expected Event::Mutation named 'key2'" ;
12771280 }
12781281
1279- runNextTask (lpAuxioQ ,
1282+ runNextTask (lpNonIoQ ,
12801283 " Process checkpoint(s) for DCP producer test_producer" );
12811284
12821285 result = stream->next ();
@@ -1539,7 +1542,9 @@ TEST_P(STParamPersistentBucketTest, MB22960_cursor_dropping_data_loss) {
15391542 ckpt_mgr.removeCursor (mock_stream->getCursor ().lock ().get ());
15401543
15411544 auto & lpAuxioQ = *task_executor->getLpTaskQ ()[AUXIO_TASK_IDX];
1542- EXPECT_EQ (2 , lpAuxioQ.getFutureQueueSize ());
1545+ EXPECT_EQ (1 , lpAuxioQ.getFutureQueueSize ());
1546+ auto & lpNonIoQ = *task_executor->getLpTaskQ ()[NONIO_TASK_IDX];
1547+ EXPECT_EQ (1 , lpNonIoQ.getFutureQueueSize ());
15431548 // backfill:create()
15441549 runNextTask (lpAuxioQ);
15451550 // backfill:scan()
@@ -1743,7 +1748,9 @@ TEST_P(STParamPersistentBucketTest,
17431748 mock_stream->next ();
17441749
17451750 auto & lpAuxioQ = *task_executor->getLpTaskQ ()[AUXIO_TASK_IDX];
1746- EXPECT_EQ (2 , lpAuxioQ.getFutureQueueSize ());
1751+ EXPECT_EQ (1 , lpAuxioQ.getFutureQueueSize ());
1752+ auto & lpNonIoQ = *task_executor->getLpTaskQ ()[NONIO_TASK_IDX];
1753+ EXPECT_EQ (1 , lpNonIoQ.getFutureQueueSize ());
17471754 // backfill:create()
17481755 runNextTask (lpAuxioQ, " Backfilling items for a DCP Connection" );
17491756 // backfill:scan()
@@ -1783,7 +1790,7 @@ TEST_P(STParamPersistentBucketTest,
17831790 ASSERT_EQ (1 , registerCursorCount);
17841791
17851792 // ActiveStreamCheckpointProcessorTask
1786- runNextTask (lpAuxioQ , " Process checkpoint(s) for DCP producer " + testName);
1793+ runNextTask (lpNonIoQ , " Process checkpoint(s) for DCP producer " + testName);
17871794 // BackfillManagerTask
17881795 runNextTask (lpAuxioQ, " Backfilling items for a DCP Connection" );
17891796
@@ -1917,7 +1924,7 @@ TEST_P(STParamPersistentBucketTest, MB19428_no_streams_against_dead_vbucket) {
19171924 getEPBucket ().flushVBucket (vbid));
19181925
19191926 setVBucketStateAndRunPersistTask (vbid, vbucket_state_dead);
1920- auto & lpAuxioQ = *task_executor->getLpTaskQ ()[AUXIO_TASK_IDX ];
1927+ auto & lpNonIoQ = *task_executor->getLpTaskQ ()[NONIO_TASK_IDX ];
19211928
19221929 {
19231930 // Create a Mock Dcp producer
@@ -1928,7 +1935,7 @@ TEST_P(STParamPersistentBucketTest, MB19428_no_streams_against_dead_vbucket) {
19281935
19291936 // Creating a producer will not create an
19301937 // ActiveStreamCheckpointProcessorTask until a stream is created.
1931- EXPECT_EQ (0 , lpAuxioQ .getFutureQueueSize ());
1938+ EXPECT_EQ (0 , lpNonIoQ .getFutureQueueSize ());
19321939
19331940 uint64_t rollbackSeqno;
19341941 auto err = producer->streamRequest (
@@ -1948,7 +1955,7 @@ TEST_P(STParamPersistentBucketTest, MB19428_no_streams_against_dead_vbucket) {
19481955
19491956 // The streamRequest failed and should not of created anymore tasks than
19501957 // ActiveStreamCheckpointProcessorTask.
1951- EXPECT_EQ (1 , lpAuxioQ .getFutureQueueSize ());
1958+ EXPECT_EQ (1 , lpNonIoQ .getFutureQueueSize ());
19521959
19531960 // Stop Producer checkpoint processor task
19541961 producer->cancelCheckpointCreatorTask ();
@@ -1999,8 +2006,9 @@ TEST_F(SingleThreadedEPBucketTest, ReadyQueueMaintainsWakeTimeOrder) {
19992006TEST_F (SingleThreadedEPBucketTest, MB20235_wake_and_work_count) {
20002007 class TestTask : public GlobalTask {
20012008 public:
2002- TestTask (EventuallyPersistentEngine *e, double s) :
2003- GlobalTask (e, TaskId::ActiveStreamCheckpointProcessorTask, s) {}
2009+ TestTask (EventuallyPersistentEngine* e, double s)
2010+ : GlobalTask(e, TaskId::AccessScanner, s) {
2011+ }
20042012 bool run () override {
20052013 return false ;
20062014 }
@@ -2504,6 +2512,12 @@ TEST_P(MB20054_SingleThreadedEPStoreTest,
25042512 EXPECT_EQ (0 , lpAuxioQ->getFutureQueueSize ());
25052513 EXPECT_EQ (0 , lpAuxioQ->getReadyQueueSize ());
25062514
2515+ auto lpNonIoQ = task_executor->getLpTaskQ ()[NONIO_TASK_IDX];
2516+ // Initially have ConnNotifierCallback and ConnManagerTasks on NonIO queue.
2517+ const size_t numInitialNonIoTasks = 2 ;
2518+ EXPECT_EQ (numInitialNonIoTasks, lpNonIoQ->getFutureQueueSize ());
2519+ EXPECT_EQ (0 , lpNonIoQ->getReadyQueueSize ());
2520+
25072521 // Directly flush the vbucket, ensuring data is on disk.
25082522 // (This would normally also wake up the checkpoint remover task, but
25092523 // as that task was never registered with the ExecutorPool in this test
@@ -2550,9 +2564,12 @@ TEST_P(MB20054_SingleThreadedEPStoreTest,
25502564 dummy_dcp_add_failover_cb,
25512565 {}));
25522566
2553- // FutureQ should now have an additional DCPBackfill task.
2554- EXPECT_EQ (2 , lpAuxioQ->getFutureQueueSize ());
2567+ // FutureQ should now have an additional DCPBackfill task /
2568+ // ActiveStreamCheckpointProcessorTask.
2569+ EXPECT_EQ (1 , lpAuxioQ->getFutureQueueSize ());
25552570 EXPECT_EQ (0 , lpAuxioQ->getReadyQueueSize ());
2571+ EXPECT_EQ (numInitialNonIoTasks + 1 , lpNonIoQ->getFutureQueueSize ());
2572+ EXPECT_EQ (0 , lpNonIoQ->getReadyQueueSize ());
25562573
25572574 // Create an executor 'thread' to obtain shared ownership of the next
25582575 // AuxIO task (which should be BackfillManagerTask). As long as this
0 commit comments