sageserpent-open / plutonium

CQRS providing bitemporal object modelling for Java POJOs and Scala too.
MIT License
5 stars 0 forks source link

Spurious ghosts observed in benchmark. #63

Closed sageserpent-open closed 5 years ago

sageserpent-open commented 5 years ago

Running the benchmark as of commit: 1c351368d4d93b0c33edfccf4bc904d527605151 reveals a repeatable failure where attempting to calculate the transitive closure of a thing object queried from a scope faults, due to an indirectly referenced thing object being a ghost.

This is despite the benchmark not actually booking in any annihilations.

Cursory investigation reveals that the incremental recalculation applies a patch that brings in the thing object via the fallback for annihilated items, this is within 'IdentifiedItemAccessUsingBlobStorage.relatedItemFor'.

sageserpent-open commented 5 years ago

Although this was observed running the benchmark with 'WorldH2StorageImplementation', it also occurs with 'WorldEfficientInMemoryImplementation', repeatably at same revision step 4100 as the other implementation, thing id 372.

This implies that the bug is connected with the process of incremental recalculation / interaction with the abstract blob storage model, and is not connected with tranche storage, immutable object store proxies or any specific blob storage implementation.

sageserpent-open commented 5 years ago

Given that this involves related items, could this be connected with #57 ?

sageserpent-open commented 5 years ago

The plan is to add a bug reproduction test first, and to see what can bee added to the existing Scalacheck tests that involve related items to expose the bug (or to add a new Scalacheck test).

sageserpent-open commented 5 years ago

NOTE: commit 5df1fc6d0fed4c6e1712521f2a655756265e0753 puts in a temporary workaround into 'Thing' that will need to be backed out for this bug to be exposed in the benchmark.

sageserpent-open commented 5 years ago

Oops - the 'workaround' in commit 5df1fc6 actually provokes the same bug in other tests. At least we have test failures now.

sageserpent-open commented 5 years ago

Bug reproduced cleanly in commit 6642ba56f5b43f67dc68e720f1b435d8215b1229.

sageserpent-open commented 5 years ago

As suspected, this is exhibited by both 'WorldEfficientInMemoryImplementation' and 'WorldH2StorageImplementation'.

The reference implementation does not exhibit this bug.

sageserpent-open commented 5 years ago

One last thing - it appears that the sporadic failure referenced by #57 is still occurring, so that is indeed a separate issue.