els0r/goProbe

Ensure correct timestamp order and handle edge cases in legacy DB conversion

fako1024 opened this issue · 0 comments

It occurred to me that there are two minor flaws in the legacy conversion tool:

  1. It currently relies on os.ReadDir() to return the output in forward sorted order. While this should be the case I recall that this isn't 100% guaranteed by the underlying syscall, so it would be prudent to sort in reverse temporal order instead of blindly reversing the slice.
  2. The conversion script would choke in case there was any stray directory somewhere inside the tree (e.g. from some debugging or a corruption), causing uncontrollable behavior. To be sure, we should ignore any non-directories and non-epoch directories early in the process.