pvary commented on code in PR #18823:
URL: https://github.com/apache/iceberg/pull/18823#discussion_r4677570192
##########
flink/v2.3/flink/src/test/java/org/apache/iceberg/flink/sink/TestIcebergSinkTableMaintenance.java:
##########
@@ -441,12 +441,25 @@ public void testConvertEqualityDeletesE2e(String
lockType) throws Exception {
}
}
- // TODO: Also run with the JDBC lock once JdbcLockFactory creates the lock
table safely. The
- // trigger manager and the lock remover both create it on open, and the
second CREATE TABLE
- // fails with "table already exists" when they race.
@Test
public void testConvertEqualityDeletesWithRewriteEnabledE2e() throws
Exception {
- setupLockConfig("");
+ checkConvertEqualityDeletesWithRewriteEnabledE2e("");
+ }
+
+ @Test
+ public void testConvertEqualityDeletesWithRewriteEnabledJdbcE2e() throws
Exception {
+
checkConvertEqualityDeletesWithRewriteEnabledE2e(LockConfig.JdbcLockConfig.JDBC);
+ }
+
+ private void checkConvertEqualityDeletesWithRewriteEnabledE2e(String
lockType) throws Exception {
+ setupLockConfig(lockType);
+ if (LockConfig.JdbcLockConfig.JDBC.equals(lockType)) {
+ flinkConf.put(
+ LockConfig.JdbcLockConfig.JDBC_URI_OPTION.key(),
+ "jdbc:sqlite:file:maintenance-"
Review Comment:
Can we leave a short comment for the future developers, why this is needed?
##########
flink/v2.3/flink/src/test/java/org/apache/iceberg/flink/sink/TestIcebergSinkTableMaintenance.java:
##########
@@ -441,12 +441,25 @@ public void testConvertEqualityDeletesE2e(String
lockType) throws Exception {
}
}
- // TODO: Also run with the JDBC lock once JdbcLockFactory creates the lock
table safely. The
- // trigger manager and the lock remover both create it on open, and the
second CREATE TABLE
- // fails with "table already exists" when they race.
@Test
public void testConvertEqualityDeletesWithRewriteEnabledE2e() throws
Exception {
- setupLockConfig("");
+ checkConvertEqualityDeletesWithRewriteEnabledE2e("");
+ }
+
+ @Test
+ public void testConvertEqualityDeletesWithRewriteEnabledJdbcE2e() throws
Exception {
+
checkConvertEqualityDeletesWithRewriteEnabledE2e(LockConfig.JdbcLockConfig.JDBC);
+ }
+
+ private void checkConvertEqualityDeletesWithRewriteEnabledE2e(String
lockType) throws Exception {
+ setupLockConfig(lockType);
+ if (LockConfig.JdbcLockConfig.JDBC.equals(lockType)) {
+ flinkConf.put(
+ LockConfig.JdbcLockConfig.JDBC_URI_OPTION.key(),
+ "jdbc:sqlite:file:maintenance-"
+ + UUID.randomUUID().toString().replace("-", "")
+ + "?mode=memory&cache=shared");
+ }
Review Comment:
nit: newline after block
--
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]