Compare commits
2 Commits
e0559c2ed1
...
b6bba16505
Author | SHA1 | Date | |
---|---|---|---|
b6bba16505 | |||
d4003d0d34 |
|
@ -511,18 +511,20 @@ class Fsck(object):
|
|||
# Verify that all timestamps are in range.
|
||||
match = (ts < stime) | (ts >= etime)
|
||||
if match.any():
|
||||
row = start + numpy.argmax(match)
|
||||
row = numpy.argmax(match)
|
||||
raise FsckError("%s: data timestamp %d at row %d "
|
||||
"outside interval range [%d,%d)",
|
||||
path, data['timestamp'][row], row,
|
||||
path, ts[row], row + start,
|
||||
stime, etime)
|
||||
|
||||
# Verify that timestamps are monotonic
|
||||
match = numpy.diff(ts) <= 0
|
||||
if match.any():
|
||||
row = start + numpy.argmax(match)
|
||||
raise FsckError("%s: non-monotonic timestamp (%d -> %d) "
|
||||
"at row %d", path, ts[row], ts[row+1], row)
|
||||
row = numpy.argmax(match)
|
||||
raise FsckError("%s: non-monotonic timestamp (%d -> %d)"
|
||||
" at row %d", path, ts[row], ts[row+1],
|
||||
row + start)
|
||||
|
||||
first_ts = ts[0]
|
||||
if last_ts is not None and first_ts <= last_ts:
|
||||
raise FsckError("%s: first interval timestamp %d is not "
|
||||
|
|
BIN
tests/fsck-data/test2v/data.sql
Normal file
BIN
tests/fsck-data/test2v/data.sql
Normal file
Binary file not shown.
BIN
tests/fsck-data/test2v/data/a/b/0000/0000
Normal file
BIN
tests/fsck-data/test2v/data/a/b/0000/0000
Normal file
Binary file not shown.
0
tests/fsck-data/test2v/data/a/b/_format
Normal file
0
tests/fsck-data/test2v/data/a/b/_format
Normal file
BIN
tests/fsck-data/test2v1/data.sql
Normal file
BIN
tests/fsck-data/test2v1/data.sql
Normal file
Binary file not shown.
BIN
tests/fsck-data/test2v1/data/a/b/0000/0000
Normal file
BIN
tests/fsck-data/test2v1/data/a/b/0000/0000
Normal file
Binary file not shown.
BIN
tests/fsck-data/test2v2/data.sql
Normal file
BIN
tests/fsck-data/test2v2/data.sql
Normal file
Binary file not shown.
0
tests/fsck-data/test2v2/data/a/b/_format
Normal file
0
tests/fsck-data/test2v2/data/a/b/_format
Normal file
Loading…
Reference in New Issue
Block a user