MCPcopy Create free account
hub / github.com/bytedance/bolt / noMoreSplitsForGroup

Method noMoreSplitsForGroup

bolt/exec/Task.cpp:1545–1569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1543}
1544
1545void Task::noMoreSplitsForGroup(
1546 const core::PlanNodeId& planNodeId,
1547 int32_t splitGroupId) {
1548 std::vector<ContinuePromise> promises;
1549 EventCompletionNotifier stateChangeNotifier;
1550 {
1551 std::lock_guard<std::timed_mutex> l(mutex_);
1552
1553 auto& splitsState = getPlanNodeSplitsStateLocked(planNodeId);
1554 auto& splitsStore = splitsState.groupSplitsStores[splitGroupId];
1555 splitsStore.noMoreSplits = true;
1556 promises = std::move(splitsStore.splitPromises);
1557
1558 // There were no splits in this group, hence, no active drivers. Mark the
1559 // group complete.
1560 if (seenSplitGroups_.count(splitGroupId) == 0) {
1561 taskStats_.completedSplitGroups.insert(splitGroupId);
1562 stateChangeNotifier.activate(std::move(stateChangePromises_));
1563 }
1564 }
1565 stateChangeNotifier.notify();
1566 for (auto& promise : promises) {
1567 promise.setValue();
1568 }
1569}
1570
1571void Task::noMoreSplits(const core::PlanNodeId& planNodeId) {
1572 std::vector<ContinuePromise> splitPromises;

Callers 2

TEST_FFunction · 0.80
TEST_FFunction · 0.80

Calls 5

activateMethod · 0.80
countMethod · 0.45
insertMethod · 0.45
notifyMethod · 0.45
setValueMethod · 0.45

Tested by 2

TEST_FFunction · 0.64
TEST_FFunction · 0.64