Fix Harry Upgrade Test - primodal epoch initialization

Patch by Alex Petrov, reviewed by Sam Tunnicliffe for CASSANDRA-19208.
This commit is contained in:
Alex Petrov 2023-12-23 13:30:22 +01:00
parent e81b2f54b4
commit b10e269344
1 changed files with 12 additions and 1 deletions

View File

@ -93,7 +93,18 @@ public final class DistributedMetadataLogKeyspace
Period.FIRST, FIRST.getEpoch(), FIRST.getEpoch(),
Transformation.Kind.PRE_INITIALIZE_CMS.toVersionedBytes(PreInitialize.blank()), Transformation.Kind.PRE_INITIALIZE_CMS.toString(), Entry.Id.NONE.entryId);
return result.one().getBoolean("[applied]");
UntypedResultSet.Row row = result.one();
if (row.getBoolean("[applied]"))
return true;
if (row.getLong("epoch") == FIRST.getEpoch() &&
row.getLong("period") == Period.FIRST &&
row.getLong("current_epoch") == FIRST.getEpoch() &&
row.getLong("entry_id") == Entry.Id.NONE.entryId &&
Transformation.Kind.PRE_INITIALIZE_CMS.toString().equals(row.getString("kind")))
return true;
throw new IllegalStateException("Could not initialize log.");
}
catch (CasWriteTimeoutException t)
{