[NO ISSUE][REP] Persist master last valid seq on index checkpoint
authorMurtadha Hubail <murtadha.hubail@couchbase.com>
Wed, 25 Aug 2021 00:20:05 +0000 (03:20 +0300)
committerMurtadha Hubail <mhubail@apache.org>
Wed, 25 Aug 2021 17:15:17 +0000 (17:15 +0000)
commitbf22dbcb42fbb252dd2506b41ade61af1b3fa63c
tree8d1c420944e9d5eea114c208817dd3842f7001c7
parent81578f901bdfccbff09bf3618b462374fca64580
[NO ISSUE][REP] Persist master last valid seq on index checkpoint

- user model changes: no
- storage format changes: no
- interface changes: yes

Details:

- When a partition owner replicates a component to a replica,
  maintain the last received component sequence from master.
  This will be used to ensure that any component generated on master,
  but the master fails before replicating it, will not be used when
  the master is re-synced (recovered) from a promoted replica.

Change-Id: I102947712daa07c83b32103b3c58fad46de2dc6d
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/12966
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <mhubail@apache.org>
Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com>
17 files changed:
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/IndexCheckpointManager.java
asterixdb/asterix-app/src/main/java/org/apache/asterix/app/nc/ReplicaManager.java
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/storage/IIndexCheckpointManager.java
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/storage/IReplicaManager.java
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/storage/IndexCheckpoint.java
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/storage/ResourceReference.java
asterixdb/asterix-common/src/main/java/org/apache/asterix/common/utils/StorageConstants.java
asterixdb/asterix-replication/src/main/java/org/apache/asterix/replication/messaging/CheckpointPartitionIndexesTask.java
asterixdb/asterix-replication/src/main/java/org/apache/asterix/replication/messaging/MarkComponentValidTask.java
asterixdb/asterix-replication/src/main/java/org/apache/asterix/replication/messaging/PartitionResourcesListResponse.java
asterixdb/asterix-replication/src/main/java/org/apache/asterix/replication/messaging/PartitionResourcesListTask.java
asterixdb/asterix-replication/src/main/java/org/apache/asterix/replication/messaging/ReplicateFileTask.java
asterixdb/asterix-replication/src/main/java/org/apache/asterix/replication/sync/FileSynchronizer.java
asterixdb/asterix-replication/src/main/java/org/apache/asterix/replication/sync/IndexSynchronizer.java
asterixdb/asterix-replication/src/main/java/org/apache/asterix/replication/sync/ReplicaFilesSynchronizer.java
asterixdb/asterix-replication/src/main/java/org/apache/asterix/replication/sync/ReplicaSynchronizer.java
asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java