verifyContainerData also does fixup, renamed. Added a Javadoc comment, both as per review discussion

This commit is contained in:
sdeka 2019-05-22 09:34:21 +05:30
parent 64c39856d2
commit 456bb8a3e0

View File

@ -165,14 +165,21 @@ private void verifyContainerFile(long containerID, File containerFile) {
"Skipping loading of this container.", containerFile); "Skipping loading of this container.", containerFile);
return; return;
} }
verifyContainerData(containerData); verifyAndFixupContainerData(containerData);
} catch (IOException ex) { } catch (IOException ex) {
LOG.error("Failed to parse ContainerFile for ContainerID: {}", LOG.error("Failed to parse ContainerFile for ContainerID: {}",
containerID, ex); containerID, ex);
} }
} }
public void verifyContainerData(ContainerData containerData) /**
* verify ContainerData loaded from disk and fix-up stale members.
* Specifically blockCommitSequenceId, delete related metadata
* and bytesUsed
* @param containerData
* @throws IOException
*/
public void verifyAndFixupContainerData(ContainerData containerData)
throws IOException { throws IOException {
switch (containerData.getContainerType()) { switch (containerData.getContainerType()) {
case KeyValueContainer: case KeyValueContainer: