[CONTROLLER-2020] Enable testSnapshotOnRootOverwrite() with ClientBackedDataStore Created: 11/Nov/21  Updated: 22/Jan/24

Status: In Progress
Project: controller
Component/s: clustering
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Medium
Reporter: Robert Varga Assignee: Ivan Hrasko
Resolution: Unresolved Votes: 0
Labels: pick-next, pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

We have this test disabled for tell-based protocol, as it fails on:

testSnapshotOnRootOverwrite[class org.opendaylight.controller.cluster.databroker.TestClientBackedDataStore](org.opendaylight.controller.cluster.datastore.DistributedDataStoreRemotingIntegrationTest)  Time elapsed: 9.265 s  <<< FAILURE!
java.lang.AssertionError: expected:<1> but was:<-1>
    at org.junit.Assert.fail(Assert.java:89)
    at org.junit.Assert.failNotEquals(Assert.java:835)
    at org.junit.Assert.assertEquals(Assert.java:647)
    at org.junit.Assert.assertEquals(Assert.java:633)
    at org.opendaylight.controller.cluster.datastore.DistributedDataStoreRemotingIntegrationTest.lambda$testSnapshotOnRootOverwrite$20(DistributedDataStoreRemotingIntegrationTest.java:1430)
    at org.opendaylight.controller.cluster.datastore.IntegrationTestKit.verifyShardState(IntegrationTestKit.java:318)
    at org.opendaylight.controller.cluster.datastore.DistributedDataStoreRemotingIntegrationTest.testSnapshotOnRootOverwrite(DistributedDataStoreRemotingIntegrationTest.java:1429)


 Comments   
Comment by Šimon Ukuš [ 26/Apr/23 ]

testSnapshotOnRootOverwrite() [CBDS == ClientBackedDataStore ; DDS == DistributedDataStore]

  • tests ReplicatedLog snapshot indexes
  • testing procedure:
  1. write&readData - root
  2. verifyFakeSnap
  3. verifyRealSnap
  4. write&readData x 10
  5. verifyFakeSnap
  6. verifyRealSnap
  7. write&readData - root
  8. verifyFakeSnap
  9. verifyRealSnap
  • where write&readData is composed of 2 operations
    • newReadWriteTransaction() -> write() -> ready() -> commit()
    • newReadOnlyTransaction() -> read() ... (verify written data)

[fs == fakeSnapshotIndex ; rs == realSnapshotIndex]

  • snapshotIndex starts at -1

for DDS we expect these indexes while going through the points of the testing procedure:
1. -> fs=1 | rs=1

  • DisableTrackingPayload + Simple
  • root overwrite causes the capture of a real snapshot

4. -> fs=10 | rs=1

  • Simple
  • real snapshot not being captured

7. -> fs=12 | rs=12

  • Simple
  • again root overwrite -> real snapshot capture -> everything in it

for CBDS we expect these indexes:

1. -> fs=0 | rs=0

  • Simple

4. -> fs=20 | rs=0

  • PurgeTransactionPayload + Simple

7. -> fs=22 | rs=22

  • root overwritten
  • compared to DDS, here we have extra LogEntry guaranteed per write&read
  • this is, however not true always ... sometimes extra LogEntries with AbortTransactionPayload are being appended to ReplicatedLog
  • the transactions being aborted are LocalReadOnly, that were used for reading the written data
  • these transaction were NOT CLOSED while releasing state associated with that transaction
Generated at Wed Feb 07 19:57:00 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.