-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IGNITE-22620 Implement ReplicaSafeTimeSyncRequest processing for zone replica #5258
base: main
Are you sure you want to change the base?
Conversation
@@ -656,6 +660,41 @@ public void testScanCloseReplicaRequest() throws Exception { | |||
assertDoesNotThrow(tx::commit); | |||
} | |||
|
|||
@Test | |||
public void testReplicaSafeTimeSyncRequest() throws Exception { | |||
// Prepare a single node cluster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a single node cluster))
// Create a table to work with. | ||
createTable(node0, zoneName, "test_table"); | ||
|
||
HybridTimestamp node0safeTimeBefore = node0.currentSafeTimeForZonePartition(zoneId, partId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currentSafeTimeForZonePartition may fail with Missing resources for zone
if you will call
ZonePartitionResources getZonePartitionResources(ZonePartitionId zonePartitionId) {
ZoneResources zoneResources = resourcesByZoneId.get(zonePartitionId.zoneId());
fast enough.
int partId = 0; | ||
|
||
// Create a table to work with. | ||
createTable(node0, zoneName, "test_table"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please adjust the test in a following way.
- Create zone
- ensure that safeTime was successfully adjusted. // It should be possible to adjust timestamp even if there's no tables in zone.
- Create table
- await table creation and ensure that safeTime was successfully adjusted.
JIRA Ticket: IGNITE-22620
The goal
The reason
The solution