Merge pull request #1313 from metamx/indexIOValidatorTSFix

Fix IndexIO segment validator to account for timestamp mismatches.
This commit is contained in:
Xavier Léauté 2015-04-27 13:01:39 -07:00
commit 625ae830d9
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) {