fdb-record-layer icon indicating copy to clipboard operation
fdb-record-layer copied to clipboard

OnlineIndexerBuildRankIndexTest::addWhileBuildingParallelRank fails intermittently

Open alecgrieser opened this issue 9 months ago • 0 comments

This assertion appears to be failing intermittently for the OnlineIndexerBuildRankIndexIndexTest::addWhileBuildingParallelRank test:

https://github.com/FoundationDB/fdb-record-layer/blob/2f127f62e77a71d0450c948100735dc457b74d23/fdb-record-layer-core/src/test/java/com/apple/foundationdb/record/provider/foundationdb/OnlineIndexerBuildIndexTest.java#L301

For example, this test failure on commit hash 396a0ce52f786460e75d24d420b11657b0bf58ca:

OnlineIndexerBuildRankIndexTest$Unsafe > addWhileBuildingParallelRank(long) > com.apple.foundationdb.record.provider.foundationdb.OnlineIndexerBuildRankIndexTest$Unsafe.addWhileBuildingParallelRank(long)[2] FAILED
    org.opentest4j.AssertionFailedError: expected: <182> but was: <181>
        at app//org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
        at app//org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
        at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
        at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:177)
        at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:618)
        at app//com.apple.foundationdb.record.provider.foundationdb.OnlineIndexerBuildIndexTest.singleRebuild(OnlineIndexerBuildIndexTest.java:301)
        at app//com.apple.foundationdb.record.provider.foundationdb.OnlineIndexerBuildRankIndexTest.rankRebuild(OnlineIndexerBuildRankIndexTest.java:180)
        at app//com.apple.foundationdb.record.provider.foundationdb.OnlineIndexerBuildRankIndexTest.addWhileBuildingParallelRank(OnlineIndexerBuildRankIndexTest.java:263)

This assertion comes from after the index has been built, but before it has been marked as readable, and it appears to be checking that number of records reported in the persisted "index build state" match the number of records in the metrics. In this case, it seems like the index builder has an extra record beyond the value that is being stored in the index builder.

alecgrieser avatar May 09 '24 08:05 alecgrieser