MCPcopy Create free account
hub / github.com/apache/mesos / checkpointVolumeState

Method checkpointVolumeState

src/csi/v1_volume_manager.cpp:1282–1295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1280
1281
1282void VolumeManagerProcess::checkpointVolumeState(const string& volumeId)
1283{
1284 const string statePath =
1285 paths::getVolumeStatePath(rootDir, info.type(), info.name(), volumeId);
1286
1287 // NOTE: We ensure the checkpoint is synced to the filesystem to avoid
1288 // resulting in a stale or empty checkpoint when a system crash happens.
1289 Try<Nothing> checkpoint =
1290 slave::state::checkpoint(statePath, volumes.at(volumeId).state, true);
1291
1292 CHECK_SOME(checkpoint)
1293 << "Failed to checkpoint volume state to '" << statePath << "':"
1294 << checkpoint.error();
1295}
1296
1297
1298void VolumeManagerProcess::garbageCollectMountPath(const string& volumeId)

Callers

nothing calls this directly

Calls 6

getVolumeStatePathFunction · 0.85
checkpointFunction · 0.85
typeMethod · 0.80
atMethod · 0.80
errorMethod · 0.65
nameMethod · 0.45

Tested by

no test coverage detected