Skip to content

Commit b2f0ae3

Browse files
committed
TMP
1 parent 99145cd commit b2f0ae3

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

src/groups/mqb/mqbc/mqbc_storagemanager.cpp

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,19 @@ void StorageManager::processShutdownEventDispatched(int partitionId)
11451145
mqbs::FileStore* fs = d_fileStores[partitionId].get();
11461146
BSLS_ASSERT_SAFE(fs);
11471147

1148+
StorageUtil::processShutdownEventDispatched(
1149+
d_clusterData_p,
1150+
&d_partitionInfoVec[partitionId],
1151+
fs,
1152+
partitionId);
1153+
1154+
// TODO Remove this action from PFSM
1155+
StorageUtil::clearPrimaryForPartition(fs,
1156+
&d_partitionInfoVec[partitionId],
1157+
"TODO",
1158+
partitionId,
1159+
0 /** TODO The primary node */);
1160+
11481161
// TODO fs.execute(&clearPrimaryForPartition2 || &shutdownMyBro); Then
11491162
// dispatch e_STOPPED
11501163
EventData eventDataVec;
@@ -1159,12 +1172,6 @@ void StorageManager::processShutdownEventDispatched(int partitionId)
11591172
queueSp->emplace(PartitionFSM::Event::e_STOP_NODE, eventDataVec);
11601173

11611174
d_partitionFSMVec[partitionId]->popEventAndProcess(queueSp);
1162-
1163-
StorageUtil::processShutdownEventDispatched(
1164-
d_clusterData_p,
1165-
&d_partitionInfoVec[partitionId],
1166-
fs,
1167-
partitionId);
11681175
}
11691176

11701177
void StorageManager::forceFlushFileStores()
@@ -3926,6 +3933,8 @@ void StorageManager::stop()
39263933
eventDataVec);
39273934
}
39283935

3936+
// TODO Do any of the calls below suffer from race condition if pinfo ==
3937+
// d_partitionInfoVec[partitionId] gets cleared early?
39293938
for (int p = 0; p < d_clusterConfig.partitionConfig().numPartitions();
39303939
p++) {
39313940
d_fileStores[p]->execute(

0 commit comments

Comments
 (0)