MCPcopy Create free account
hub / github.com/XTXMarkets/ternfs / start

Method start

cpp/cdc/CDCDB.cpp:606–616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

604 }
605
606 void start() {
607 // We need this explicit check here because moving directories is more complicated,
608 // and therefore we do it in another transaction type entirely.
609 if (req.targetId.type() == InodeType::DIRECTORY) {
610 env.finishWithError(TernError::TYPE_IS_NOT_DIRECTORY);
611 } else if (req.oldOwnerId == req.newOwnerId) {
612 env.finishWithError(TernError::SAME_DIRECTORIES);
613 } else {
614 lockOldEdge();
615 }
616 }
617
618 void lockOldEdge(bool repeated = false) {
619 auto& shardReq = env.needsShard(RENAME_FILE_LOCK_OLD_EDGE, req.oldOwnerId.shard(), repeated).setLockCurrentEdge();

Callers 1

_startExecutingMethod · 0.45

Calls 2

typeMethod · 0.80
finishWithErrorMethod · 0.80

Tested by

no test coverage detected