Robert Stoll created FLINK-12525: ------------------------------------ Summary: Impose invariant StreamExecutionEnvironment.setBufferTimeout > 0 Key: FLINK-12525 URL: https://issues.apache.org/jira/browse/FLINK-12525 Project: Flink Issue Type: Improvement Reporter: Robert Stoll
The documentation for the [DataStream API|https://github.com/apache/flink/blob/8674b69964eae50cad024f2c5caf92a71bf21a09/docs/dev/datastream_api.md#controlling-latency] states: {quote}buffer timeout of 0 should be avoided, because it can cause severe performance degradation. {quote} I don't know if the documentation is not appropriate and there are valid cases where a timeout of 0 makes sense. But if not, then the invariant should not be {color:#c586c0}if{color}{color:#d4d4d4} (timeoutMillis {color}{color:#d4d4d4}<{color} {color:#d4d4d4}-{color}{color:#b5cea8}1{color}{color:#d4d4d4}) {{color} {color:#d4d4d4} {color}{color:#c586c0}throw{color} {color:#c586c0}new{color} {color:#dcdcaa}IllegalArgumentException{color}{color:#d4d4d4}({color}{color:#ce9178}"Timeout of buffer must be non-negative or -1"{color}{color:#d4d4d4});{color} {color:#d4d4d4}}{color} But {{timeoutMillis < 0}} (can also be a second invariant) IMO it is bad practice to state it only in the documentation. The API should guide the user in this case (in this sense a second invariant stating the quote above would make more sense). -- This message was sent by Atlassian JIRA (v7.6.3#76005)