Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARTEMIS-5241 remove useless validation for cluster-connection confirmation-window-size #5435

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,6 @@ public class ConfigurationImpl implements Configuration, Serializable {

public static final String PROPERTY_CLASS_SUFFIX = ".class";

private static final int DEFAULT_JMS_MESSAGE_SIZE = 1864;

private static final int RANGE_SIZE_MIN = 0;

private static final int RANGE_SZIE_MAX = 4;

private static final long serialVersionUID = 4077088945050267843L;

private String name = "localhost";
Expand Down Expand Up @@ -3231,26 +3225,6 @@ public ConfigurationImpl setPageSyncTimeout(final int pageSyncTimeout) {
return this;
}

public static boolean checkoutDupCacheSize(final int windowSize, final int idCacheSize) {
final int msgNumInFlight = windowSize / DEFAULT_JMS_MESSAGE_SIZE;

if (msgNumInFlight == 0) {
return true;
}

boolean sizeGood = false;

if (idCacheSize >= msgNumInFlight) {
int r = idCacheSize / msgNumInFlight;

// This setting is here to accomodate the current default setting.
if ((r >= RANGE_SIZE_MIN) && (r <= RANGE_SZIE_MAX)) {
sizeGood = true;
}
}
return sizeGood;
}

/**
* It will find the right location of a subFolder, related to artemisInstance
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
import org.apache.activemq.artemis.core.client.impl.Topology;
import org.apache.activemq.artemis.core.client.impl.TopologyManager;
import org.apache.activemq.artemis.core.client.impl.TopologyMemberImpl;
import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl;
import org.apache.activemq.artemis.core.filter.impl.FilterImpl;
import org.apache.activemq.artemis.core.postoffice.Binding;
import org.apache.activemq.artemis.core.postoffice.PostOffice;
Expand Down Expand Up @@ -931,10 +930,6 @@ private void createNewRecord(final long eventUID,
if (start) {
bridge.start();
}

if (!ConfigurationImpl.checkoutDupCacheSize(serverLocator.getConfirmationWindowSize(), server.getConfiguration().getIDCacheSize())) {
ActiveMQServerLogger.LOGGER.duplicateCacheSizeWarning(server.getConfiguration().getIDCacheSize(), serverLocator.getConfirmationWindowSize());
}
}

private class MessageFlowRecordImpl implements MessageFlowRecord {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -902,15 +902,6 @@ public void testBrokerPlugin() throws Exception {
assertTrue(brokerPlugins.get(1) instanceof EmptyPlugin2);
}

@TestTemplate
public void testDefaultConstraints() {
int defaultConfirmationWinSize = ActiveMQDefaultConfiguration.getDefaultClusterConfirmationWindowSize();
int defaultIdCacheSize = ActiveMQDefaultConfiguration.getDefaultIdCacheSize();
assertTrue(ConfigurationImpl.checkoutDupCacheSize(defaultConfirmationWinSize, defaultIdCacheSize), "check failed, " + defaultConfirmationWinSize + ":" + defaultIdCacheSize);
defaultConfirmationWinSize = ActiveMQDefaultConfiguration.getDefaultBridgeConfirmationWindowSize();
assertTrue(ConfigurationImpl.checkoutDupCacheSize(defaultConfirmationWinSize, defaultIdCacheSize), "check failed, " + defaultConfirmationWinSize + ":" + defaultIdCacheSize);
}

@TestTemplate
public void testJournalFileOpenTimeoutDefaultValue() throws Exception {
ActiveMQServerImpl server = new ActiveMQServerImpl();
Expand Down