smaheshwar-pltr commented on code in PR #18489:
URL: https://github.com/apache/iceberg/pull/18489#discussion_r4644368426


##########
spark/v4.0/spark/src/test/java/org/apache/iceberg/spark/sql/TestTableEncryption.java:
##########
@@ -185,6 +185,29 @@ void transactionCanReadAfterTableRefresh() {
     assertThat(currentDataFiles(table)).hasSize(dataFiles.size() + 1);
   }
 
+  @TestTemplate
+  void transactionCanReadAfterMetadataCommits() {
+    validationCatalog.initialize(catalogName, catalogConfig);
+    Table table = validationCatalog.loadTable(tableIdent);
+    List<DataFile> dataFiles = currentDataFiles(table);
+    DataFile file = dataFiles.get(0);
+
+    Transaction transaction = table.newTransaction();
+    transaction.newFastAppend().appendFile(file).commit();
+
+    // Commit twice to check that the transaction's keys survive back-to-back 
refreshes.
+    table.updateProperties().set("prop", "first").commit();
+    table.updateProperties().set("prop", "second").commit();

Review Comment:
   Thanks, the flow here is complicated so I've added some comments. To 
clarify, the failure is at the read, not at the transaction commit - as 
mentioned in the PR description this is _not_ a key loss / corruption bug.



-- 
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