You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "mnpoonia (via GitHub)" <gi...@apache.org> on 2023/02/10 06:15:15 UTC

[GitHub] [phoenix] mnpoonia commented on a diff in pull request #1559: PHOENIX-6871 Fix write threads deadlock

mnpoonia commented on code in PR #1559:
URL: https://github.com/apache/phoenix/pull/1559#discussion_r1102313724


##########
phoenix-core/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java:
##########
@@ -502,9 +503,10 @@ private void populateRowsToLock(MiniBatchOperationInProgress<Mutation> miniBatch
           Mutation m = miniBatchOp.getOperation(i);
           if (this.builder.isAtomicOp(m) || this.builder.isEnabled(m)) {
               ImmutableBytesPtr row = new ImmutableBytesPtr(m.getRow());
-              if (!context.rowsToLock.contains(row)) {
+//              This seems to be unnecessary as we are using a set here
+//              if (!context.rowsToLock.contains(row)) {

Review Comment:
   Done



##########
phoenix-core/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java:
##########
@@ -227,7 +228,7 @@ public static class BatchMutateContext {
       // The collection of candidate index mutations that will be applied after the data table mutations
       private ListMultimap<HTableInterfaceReference, Pair<Mutation, byte[]>> indexUpdates;
       private List<RowLock> rowLocks = Lists.newArrayListWithExpectedSize(QueryServicesOptions.DEFAULT_MUTATE_BATCH_SIZE);
-      private HashSet<ImmutableBytesPtr> rowsToLock = new HashSet<>();
+      private TreeSet<ImmutableBytesPtr> rowsToLock = new TreeSet<>();

Review Comment:
   DOne



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org