This is an automated email from the ASF dual-hosted git repository.
ifesdjeen pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/trunk by this push:
new b10e269344 Fix Harry Upgrade Test - primodal epoch initialization
b10e269344 is described below
commit b10e2693443bb5eb5c9b3d561f8d5e47ac092a8c
Author: Alex Petrov <[email protected]>
AuthorDate: Sat Dec 23 13:30:22 2023 +0100
Fix Harry Upgrade Test - primodal epoch initialization
Patch by Alex Petrov, reviewed by Sam Tunnicliffe for CASSANDRA-19208.
---
.../cassandra/schema/DistributedMetadataLogKeyspace.java | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git
a/src/java/org/apache/cassandra/schema/DistributedMetadataLogKeyspace.java
b/src/java/org/apache/cassandra/schema/DistributedMetadataLogKeyspace.java
index 9d16360c18..84fd433a70 100644
--- a/src/java/org/apache/cassandra/schema/DistributedMetadataLogKeyspace.java
+++ b/src/java/org/apache/cassandra/schema/DistributedMetadataLogKeyspace.java
@@ -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)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]