Skip to content

Commit

Permalink
ARTEMIS-5241 remove useless validation for cluster-connection confirm…
Browse files Browse the repository at this point in the history
…ation-window-size
  • Loading branch information
jbertram committed Jan 13, 2025
1 parent a6243be commit a7e5d1e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 39 deletions.
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 @@ -931,10 +931,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

0 comments on commit a7e5d1e

Please sign in to comment.