Fix IndexIO segment validator to account for timestamp mismatches.

This commit is contained in:
Charles Allen 2015-04-27 12:42:16 -07:00
parent 962997f3f7
commit 27016c0289
1 changed files with 6 additions and 0 deletions

View File

@ -253,6 +253,12 @@ public class IndexIO
IndexableAdapter adapter2 IndexableAdapter adapter2
) )
{ {
if(rb1.getTimestamp() != rb2.getTimestamp()){
throw new SegmentValidationException(
"Timestamp mismatch. Expected %d found %d",
rb1.getTimestamp(), rb2.getTimestamp()
);
}
final int[][] dims1 = rb1.getDims(); final int[][] dims1 = rb1.getDims();
final int[][] dims2 = rb2.getDims(); final int[][] dims2 = rb2.getDims();
if (dims1.length != dims2.length) { if (dims1.length != dims2.length) {