Skip to content

Commit

Permalink
[Java] Remove publication linger timeout validation that expected the…
Browse files Browse the repository at this point in the history
… value to be greater than or equal to the driver-level timeout, because the validation was not working and `linger=0` was allowed and is used in tests and also in the Cluster. (#1207)
  • Loading branch information
vyazelenko authored Aug 4, 2021
1 parent 8d96cf9 commit f23a926
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
15 changes: 0 additions & 15 deletions aeron-driver/src/main/java/io/aeron/driver/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -1735,21 +1735,6 @@ public static void validateMtuLength(final int mtuLength)
}
}

/**
* Validate the publication linger timeout is an appropriate value.
*
* @param timeoutNs to be validated.
* @param driverLingerTimeoutNs set for the driver operation.
* @throws ConfigurationException if the values are not valid.
*/
public static void validatePublicationLingerTimeoutNs(final long timeoutNs, final long driverLingerTimeoutNs)
{
if (timeoutNs < driverLingerTimeoutNs)
{
throw new ConfigurationException("linger=" + driverLingerTimeoutNs + " < timeoutNs =" + timeoutNs);
}
}

/**
* Get the {@link TerminationValidator} implementations which can be used for validating a termination request
* sent to the driver to ensure the client has the right to terminate a driver.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ private void getLingerTimeoutNs(final ChannelUri channelUri)
if (null != lingerParam)
{
lingerTimeoutNs = SystemUtil.parseDuration(LINGER_PARAM_NAME, lingerParam);
Configuration.validatePublicationLingerTimeoutNs(lingerTimeoutNs, lingerTimeoutNs);
}
}

Expand Down

0 comments on commit f23a926

Please sign in to comment.