You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/12/17 14:56:41 UTC

[GitHub] [flink] wangxlong commented on a change in pull request #14377: [FLINK-19905][Connector][jdbc] The Jdbc-connector's 'lookup.max-retries' option initial value is 1 in JdbcLookupFunction

wangxlong commented on a change in pull request #14377:
URL: https://github.com/apache/flink/pull/14377#discussion_r545149366



##########
File path: flink-connectors/flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/table/JdbcTableSourceSinkFactoryTest.java
##########
@@ -255,6 +255,17 @@ public void testJdbcValidation() {
 			fail("exception expected");
 		} catch (IllegalArgumentException ignored) {
 		}
+
+		// lookup max-retries properties not complete

Review comment:
       // lookup max-retries property less than zero

##########
File path: flink-connectors/flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/table/JdbcLookupTableITCase.java
##########
@@ -120,7 +120,7 @@ public void testLookup() throws Exception {
 				.build());
 		if (useCache) {

Review comment:
       Would be better as following,
   
   > 	JdbcLookupOptions.Builder lookupOptionsBuilder = JdbcLookupOptions.builder().setMaxRetryTimes(0);
   		if (useCache) {
   			lookupOptionsBuilder.setCacheMaxSize(1000).setCacheExpireMs(1000 * 1000);
   		}
   		builder.setLookupOptions(lookupOptionsBuilder.build());

##########
File path: flink-connectors/flink-connector-jdbc/src/main/java/org/apache/flink/table/descriptors/JdbcValidator.java
##########
@@ -115,7 +115,7 @@ private void validateReadProperties(DescriptorProperties properties) {
 	private void validateLookupProperties(DescriptorProperties properties) {
 		properties.validateLong(CONNECTOR_LOOKUP_CACHE_MAX_ROWS, true);
 		properties.validateDuration(CONNECTOR_LOOKUP_CACHE_TTL, true, 1);
-		properties.validateInt(CONNECTOR_LOOKUP_MAX_RETRIES, true);
+		properties.validateInt(CONNECTOR_LOOKUP_MAX_RETRIES, true,0);

Review comment:
       Space is needed before 0.




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

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