You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to verify that the wal contents are not corrupted?
My use case involves a corruption check for the data directory before starting etcd. I have been using the wal.ReadAll() function to read through the wal contents and ensure that there are no errors in the read. But this consumes large memory for large wal sizes during high workloads, because the function returns the entire contents of the wal in memory (in the ents slice). My use case of simply verifying the integrity of the wal does not require the function returning the wal contents, but just the error from the read.
Would it be possible to expose a new function, say something like wal.Verify() that just iterates through the wal records and ensures the validity of the wal? This function would probably omit the ents array so that memory consumption is minimal, and would return only the error back to the caller. This would allow a more streamlined, lightweight version of the wal.ReadAll() function that provides verification functionality for the wal contents.
The text was updated successfully, but these errors were encountered:
I do not think we need this feature for etcd at least for now. If you want to use wal pkg for external use, I am fine with adding this feature and contributing it to the etcd codebase :)
Is there a way to verify that the wal contents are not corrupted?
My use case involves a corruption check for the data directory before starting etcd. I have been using the
wal.ReadAll()
function to read through the wal contents and ensure that there are no errors in the read. But this consumes large memory for large wal sizes during high workloads, because the function returns the entire contents of the wal in memory (in theents
slice). My use case of simply verifying the integrity of the wal does not require the function returning the wal contents, but just the error from the read.Would it be possible to expose a new function, say something like
wal.Verify()
that just iterates through the wal records and ensures the validity of the wal? This function would probably omit theents
array so that memory consumption is minimal, and would return only the error back to the caller. This would allow a more streamlined, lightweight version of thewal.ReadAll()
function that provides verification functionality for the wal contents.The text was updated successfully, but these errors were encountered: