@cadenza.io/service 2.21.2 → 2.21.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -7826,6 +7826,7 @@ var ServiceRegistry = class _ServiceRegistry {
7826
7826
  const signalName = String(
7827
7827
  ctx.__signalName ?? ctx.__signalEmission?.fullSignalName ?? ""
7828
7828
  ).trim();
7829
+ const isRuntimeStatusUnreachableSignal = signalName === "meta.service_registry.runtime_status_unreachable" || signalName.startsWith("meta.service_registry.runtime_status_unreachable.");
7829
7830
  const isFetchHandshakeFailure = signalName === "meta.fetch.handshake_failed" || signalName.startsWith("meta.fetch.handshake_failed:");
7830
7831
  const hardFetchHandshakeFailure = isFetchHandshakeFailure && isHardFetchHandshakeFailure(ctx);
7831
7832
  const recoverableFetchHandshakeFailure = isFetchHandshakeFailure && isRecoverableFetchTransportFailure(ctx, {
@@ -7837,9 +7838,18 @@ var ServiceRegistry = class _ServiceRegistry {
7837
7838
  if (isFetchDelegateFailure && !hardFetchDelegateFailure) {
7838
7839
  return false;
7839
7840
  }
7841
+ if (serviceName === "CadenzaDB") {
7842
+ if (!this.authorityBootstrapRecoveryActive) {
7843
+ this.restartAuthorityBootstrapRecovery("cadenza_db_unreachable");
7844
+ }
7845
+ return false;
7846
+ }
7840
7847
  if (serviceName === "CadenzaDB" && (isFetchHandshakeFailure && recoverableFetchHandshakeFailure || isFetchDelegateFailure && recoverableFetchDelegateFailure)) {
7841
7848
  return false;
7842
7849
  }
7850
+ if (serviceName === "CadenzaDB" && isRuntimeStatusUnreachableSignal) {
7851
+ return false;
7852
+ }
7843
7853
  if (serviceName === "CadenzaDB" && this.authorityBootstrapRecoveryActive) {
7844
7854
  return false;
7845
7855
  }
@@ -9296,6 +9306,9 @@ var ServiceRegistry = class _ServiceRegistry {
9296
9306
  if (!instance || !instance.isActive || instance.isBlocked) {
9297
9307
  continue;
9298
9308
  }
9309
+ if (instance.serviceName === "CadenzaDB") {
9310
+ continue;
9311
+ }
9299
9312
  if (this.hasReadyClientTransportForProtocol(instance, "socket")) {
9300
9313
  this.lastHeartbeatAtByInstance.set(serviceInstanceId, now);
9301
9314
  this.missedHeartbeatsByInstance.set(serviceInstanceId, 0);
@@ -13984,6 +13997,9 @@ var ServiceRegistry = class _ServiceRegistry {
13984
13997
  if (!instance.isActive || instance.isBlocked) {
13985
13998
  return false;
13986
13999
  }
14000
+ if (instance.serviceName === "CadenzaDB") {
14001
+ return false;
14002
+ }
13987
14003
  if (this.hasReadyClientTransportForProtocol(instance, "socket")) {
13988
14004
  return false;
13989
14005
  }