Skip to content

test: cover DData tombstone expiry across replicas - #3864

Draft
He-Pin wants to merge 5 commits into
apache:mainfrom
He-Pin:test-ddata-tombstone-expiry-reuse
Draft

He-Pin wants to merge 5 commits into
apache:mainfrom
He-Pin:test-ddata-tombstone-expiry-reuse

Conversation

@He-Pin

@He-Pin He-Pin commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

Motivation

Single-replica expiry and ordinary deletion tests do not establish that a replicated tombstone prevents writes until both replicas expire it, or that the key can then be reused without an old counter value.

Modification

Add an isolated real two-replica test. Observe deletion and rejected updates at both replicas, wait for both to expire the tombstone, then recreate the key from the peer and assert the fresh value on both.

Result

The corrected parent and child suites passed 2/2 each on Scala 2.13.18 and 3.3.9 with JDK 17 and real TCP loopback. In the child test, suppressing replicated deletion or retaining the tombstone each failed its intended assertion. Scoped formatting and ASF header checks passed. This covers two connected in-memory replicas, not a durable store or full sbt runtime matrix.

References

Motivation:
Existing expiry coverage checks a single Replicator. It does not show that a successful read renews the key on another replica, or detect expiry followed by a gossip refill.

Modification:
Drive two real Replicators over loopback TCP. Read one of two keys on the peer, observe the unread key expire, and verify the origin retained the read key without any intervening removal or refill. Observe eventual expiry on both replicas.

Result:
The focused suite passed on JDK 17 with Scala 2.13.18 and 3.3.9, with no skips, using the current DData module and released dependencies for other Pekko modules. Dropping the read timestamp and dropping peer timestamp consumption both failed the test as intended. Scoped formatting and repository header checks passed. No production change or full sbt test run is claimed.

References:
ReplicatorReadRenewalSpec and the DData expiry behavior introduced in apache#2733.
Motivation:
The new test's case alignment was not checked by scalafmt before the file was tracked.

Modification:
Apply the formatter's one-space adjustment to the existing case. Keep the test logic and ASF header unchanged.

Result:
The tracked file passed the repository formatter and format check. This is a whitespace-only change.

References:
Pekko apache#3862 and ReplicatorReadRenewalSpec.
Motivation:
Single-replica expiry and ordinary deletion tests do not establish that a replicated tombstone prevents writes until both replicas expire it, or that the key can then be reused without an old counter value.

Modification:
Add an isolated real two-replica test. Observe deletion and rejected updates at both replicas, wait for both to expire the tombstone, then recreate the key from the peer and assert the fresh value on both.

Result:
The corrected parent and child suites passed 2/2 each on Scala 2.13.18 and 3.3.9 with JDK 17 and real TCP loopback. In the child test, suppressing replicated deletion or retaining the tombstone each failed its intended assertion. Scoped formatting and ASF header checks passed. This covers two connected in-memory replicas, not a durable store or full sbt runtime matrix.

References:
Pekko apache#3862 and ReplicatorTombstoneExpirySpec.
Motivation:
The Classic Remoting CI job disables Artery, leaving both replica systems competing for the default TCP port.

Modification:
Configure a loopback hostname and an ephemeral port for Classic Netty alongside the existing Artery configuration.

Result:
The previous fixture reproduces the bind failure. The renewal and tombstone tests pass with both transports on Scala 2.13 and 3.3.

References:
apache#3862, apache#3864
Motivation:
The tombstone test shares the renewal fixture and fails on the same fixed Classic TCP port before exercising expiry.

Modification:
Merge the corrected parent branch into the tombstone branch without rewriting either history.

Result:
The tombstone test still contains the only child-layer change and passes with both transports on Scala 2.13 and 3.3.

References:
apache#3862, apache#3864
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant