rdblue commented on code in PR #15126:
URL: https://github.com/apache/iceberg/pull/15126#discussion_r2898187562


##########
core/src/test/java/org/apache/iceberg/rest/TestRESTCatalog.java:
##########
@@ -3712,6 +3723,139 @@ protected RESTSessionCatalog newSessionCatalog(
     return catalog;
   }
 
+  /**
+   * Test concurrent appends on multiple branches simultaneously to verify 
proper handling of
+   * sequence number conflicts.
+   *
+   * <p>Uses a barrier to synchronize threads so they all load the same table 
state and commit
+   * simultaneously, creating deterministic conflicts. With retries disabled, 
we can verify exact
+   * counts: one success per round, and (numBranches - 1) 
CommitFailedExceptions per round.
+   *
+   * <p>This verifies that: 1. Sequence number conflicts are caught by 
AssertLastSequenceNumber
+   * requirement 2. Conflicts result in CommitFailedException (retryable) not 
ValidationException
+   * (non-retryable) 3. The REST catalog properly handles concurrent 
modifications across branches
+   */
+  @Test
+  public void testConcurrentAppendsOnMultipleBranches() {

Review Comment:
   I think that this test is much too complicated. Why can't the narrow 
scenario you're trying to test be exercised with specific request objects?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to