mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 18:35:25 +00:00
short-circuit master notification when registering trial license
Original commit: elastic/x-pack-elasticsearch@877df7705b
This commit is contained in:
parent
8007136e63
commit
73754767dd
@ -392,6 +392,7 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
|
|||||||
logLicenseMetaDataStats("old", oldLicensesMetaData);
|
logLicenseMetaDataStats("old", oldLicensesMetaData);
|
||||||
logLicenseMetaDataStats("new", currentLicensesMetaData);
|
logLicenseMetaDataStats("new", currentLicensesMetaData);
|
||||||
|
|
||||||
|
// register any pending listeners
|
||||||
if (!pendingListeners.isEmpty()) {
|
if (!pendingListeners.isEmpty()) {
|
||||||
ListenerHolder pendingRegistrationListener;
|
ListenerHolder pendingRegistrationListener;
|
||||||
while ((pendingRegistrationListener = pendingListeners.poll()) != null) {
|
while ((pendingRegistrationListener = pendingListeners.poll()) != null) {
|
||||||
@ -563,21 +564,18 @@ public class LicensesService extends AbstractLifecycleComponent<LicensesService>
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
registeredListeners.add(listenerHolder);
|
|
||||||
} else {
|
} else {
|
||||||
// notify feature as clusterChangedEvent may not happen
|
// notify feature as clusterChangedEvent may not happen
|
||||||
// as no trial or signed license has been found for feature
|
// as no trial or signed license has been found for feature
|
||||||
logger.debug("Calling notifyFeaturesAndScheduleNotification [no trial license spec provided]");
|
logger.debug("Calling notifyFeaturesAndScheduleNotification [no trial license spec provided]");
|
||||||
registeredListeners.add(listenerHolder);
|
|
||||||
notifyFeaturesAndScheduleNotification(currentMetaData);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// signed license already found for the new registered
|
// signed license already found for the new registered
|
||||||
// feature, notify feature on registration
|
// feature, notify feature on registration
|
||||||
logger.debug("Calling notifyFeaturesAndScheduleNotification [signed/trial license available]");
|
logger.debug("Calling notifyFeaturesAndScheduleNotification [signed/trial license available]");
|
||||||
registeredListeners.add(listenerHolder);
|
|
||||||
notifyFeaturesAndScheduleNotification(currentMetaData);
|
|
||||||
}
|
}
|
||||||
|
registeredListeners.add(listenerHolder);
|
||||||
|
notifyFeaturesAndScheduleNotification(currentMetaData);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user