Skip to content

Commit ecc7e06

Browse files
committed
Durability Deadlock
1 parent 836e274 commit ecc7e06

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[submodule "modules/accord"]
22
path = modules/accord
3-
url = https://github.com/apache/cassandra-accord.git
4-
branch = trunk
3+
url = https://github.com/belliottsmith/cassandra-accord.git
4+
branch = durability-deadlock

src/java/org/apache/cassandra/db/virtual/AccordDebugKeyspace.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,7 +2111,7 @@ protected void collect(PartitionsCollector collector)
21112111
DebugBlockedTxns.visit(AccordService.unsafeInstance(), txnId, maxDepth, collector.deadlineNanos(), txn -> {
21122112
String keyStr = txn.blockedViaKey == null ? "" : txn.blockedViaKey.toString();
21132113
String txnIdStr = txn.txnId == null || txn.txnId.equals(txnId) ? "" : txn.txnId.toString();
2114-
rows.add(txn.commandStoreId, txn.depth, keyStr, txnIdStr)
2114+
rows.add(txn.depth, txn.commandStoreId, txnIdStr, keyStr)
21152115
.eagerCollect(columns -> {
21162116
columns.add("save_status", txn.saveStatus, TO_STRING)
21172117
.add("execute_at", txn.executeAt, TO_STRING);
@@ -2160,8 +2160,9 @@ private ShardEpochsTable()
21602160
" quorum_fast_privileged_deps int,\n" +
21612161
" quorum_fast_privileged_nodeps int,\n" +
21622162
" token_end 'TokenUtf8Type',\n" +
2163-
" PRIMARY KEY (table_id, token_start, epoch_start DESC)" +
2164-
')', UTF8Type.instance), FAIL, ASC);
2163+
" PRIMARY KEY (table_id, token_start, epoch_start))," +
2164+
" WITH CLUSTERING ORDER BY (token_start, epoch_start DESC)"
2165+
, UTF8Type.instance), FAIL, ASC);
21652166
}
21662167

21672168
@Override

test/unit/org/apache/cassandra/db/virtual/AccordDebugKeyspaceTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -643,15 +643,15 @@ public void blocked() throws ExecutionException, InterruptedException
643643
return rs.size() == 2;
644644
});
645645
assertRows(execute(QUERY_TXN_BLOCKED_BY, second.toString()),
646-
row(second.toString(), anyInt(), 0, "", "", anyNonNull(), SaveStatus.Stable.name()),
647-
row(second.toString(), anyInt(), 1, any(), first.toString(), anyNonNull(), SaveStatus.ReadyToExecute.name()));
646+
row(second.toString(), 0, anyInt(), "", "", anyNonNull(), SaveStatus.Stable.name()),
647+
row(second.toString(), 1, anyInt(), first.toString(), any(), anyNonNull(), SaveStatus.ReadyToExecute.name()));
648648
assertRows(execute(QUERY_TXN_BLOCKED_BY + " AND depth < 1", second.toString()),
649-
row(second.toString(), anyInt(), 0, any(), "", anyNonNull(), SaveStatus.Stable.name()));
649+
row(second.toString(), 0, anyInt(), "", any(), anyNonNull(), SaveStatus.Stable.name()));
650650
assertRows(execute(QUERY_TXN_BLOCKED_BY_REMOTE, nodeId, second.toString()),
651-
row(nodeId, second.toString(), anyInt(), 0, "", "", anyNonNull(), SaveStatus.Stable.name()),
652-
row(nodeId, second.toString(), anyInt(), 1, any(), first.toString(), anyNonNull(), SaveStatus.ReadyToExecute.name()));
651+
row(nodeId, second.toString(), 0, anyInt(), "", "", anyNonNull(), SaveStatus.Stable.name()),
652+
row(nodeId, second.toString(), 1, anyInt(), first.toString(), any(), anyNonNull(), SaveStatus.ReadyToExecute.name()));
653653
assertRows(execute(QUERY_TXN_BLOCKED_BY_REMOTE + " AND depth < 1", nodeId, second.toString()),
654-
row(nodeId, second.toString(), anyInt(), 0, any(), "", anyNonNull(), SaveStatus.Stable.name()));
654+
row(nodeId, second.toString(), 0, anyInt(), "", any(), anyNonNull(), SaveStatus.Stable.name()));
655655
}
656656
finally
657657
{

0 commit comments

Comments
 (0)