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

Method checkpointVolumeState

src/csi/v0_volume_manager.cpp:1236–1249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1234
1235
1236void VolumeManagerProcess::checkpointVolumeState(const string& volumeId)
1237{
1238 const string statePath =
1239 paths::getVolumeStatePath(rootDir, info.type(), info.name(), volumeId);
1240
1241 // NOTE: We ensure the checkpoint is synced to the filesystem to avoid
1242 // resulting in a stale or empty checkpoint when a system crash happens.
1243 Try<Nothing> checkpoint =
1244 slave::state::checkpoint(statePath, volumes.at(volumeId).state, true);
1245
1246 CHECK_SOME(checkpoint)
1247 << "Failed to checkpoint volume state to '" << statePath << "':"
1248 << checkpoint.error();
1249}
1250
1251
1252void 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