@memberjunction/redis-provider 6.2.0-edge.1 → 6.2.0-edge.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.
|
@@ -77,12 +77,22 @@ export interface RedisProviderConfig {
|
|
|
77
77
|
*/
|
|
78
78
|
defaultTTLSeconds?: number;
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
80
|
+
* Caps reconnection attempts. Past the cap ioredis stops reconnecting for the life of the
|
|
81
|
+
* client, leaving the process cache-blind until it restarts.
|
|
82
82
|
*
|
|
83
|
-
*
|
|
83
|
+
* Omit it on a long-running process. Set it only for a short-lived script that should fail
|
|
84
|
+
* rather than wait out an outage.
|
|
85
|
+
*
|
|
86
|
+
* @default undefined — retry indefinitely, with each wait capped by {@link maxRetryDelayMs}
|
|
84
87
|
*/
|
|
85
88
|
maxRetries?: number;
|
|
89
|
+
/**
|
|
90
|
+
* Ceiling on the wait between reconnection attempts, in milliseconds. The backoff doubles from
|
|
91
|
+
* 200ms up to this value and then holds there, so a long outage costs one attempt per ceiling.
|
|
92
|
+
*
|
|
93
|
+
* @default 30000
|
|
94
|
+
*/
|
|
95
|
+
maxRetryDelayMs?: number;
|
|
86
96
|
/**
|
|
87
97
|
* Whether to log connection events (connect, disconnect, error) via
|
|
88
98
|
* MemberJunction's `LogStatus` / `LogError` functions.
|
|
@@ -156,16 +166,55 @@ export declare class RedisLocalStorageProvider implements ILocalStorageProvider
|
|
|
156
166
|
* See {@link ILocalStorageProvider.SharesReferences}.
|
|
157
167
|
*/
|
|
158
168
|
readonly SharesReferences = false;
|
|
169
|
+
/**
|
|
170
|
+
* `true` — that is the whole point of this provider: every server in the fleet reads what any
|
|
171
|
+
* other wrote. See {@link ILocalStorageProvider.SupportsCrossProcessPersistence}.
|
|
172
|
+
*/
|
|
173
|
+
readonly SupportsCrossProcessPersistence = true;
|
|
159
174
|
private _client;
|
|
160
175
|
private _keyPrefix;
|
|
161
176
|
private _defaultTTLSeconds;
|
|
162
177
|
private _enableLogging;
|
|
163
178
|
private _connected;
|
|
179
|
+
/** Ceiling on the reconnect delay. See {@link RedisProviderConfig.maxRetryDelayMs}. */
|
|
180
|
+
private _maxRetryDelayMs;
|
|
181
|
+
/**
|
|
182
|
+
* Whether this client has ever been connected. Distinguishes a startup that has not reached
|
|
183
|
+
* Redis yet, where queueing a command is useful, from a connection that was lost, where
|
|
184
|
+
* {@link shouldFailFast} applies.
|
|
185
|
+
*/
|
|
186
|
+
private _hasEverConnected;
|
|
187
|
+
/**
|
|
188
|
+
* The highest shared epoch this process has seen, from its own mutations and from events
|
|
189
|
+
* received. {@link reconcileAfterReconnect} compares it against the value in Redis to decide
|
|
190
|
+
* whether anything was invalidated during a connection gap.
|
|
191
|
+
*/
|
|
192
|
+
private _lastSeenEpoch;
|
|
193
|
+
/**
|
|
194
|
+
* Whether this process mutated shared state while disconnected, meaning other servers never
|
|
195
|
+
* received those invalidations. Set so {@link reconcileAfterReconnect} can bump the epoch on
|
|
196
|
+
* recovery and make them flush.
|
|
197
|
+
*/
|
|
198
|
+
private _mutatedWhileDisconnected;
|
|
199
|
+
/** Guards against two overlapping reconciliations (client and subscriber both recover). */
|
|
200
|
+
private _reconciling;
|
|
201
|
+
/**
|
|
202
|
+
* Whether the loss of this connection has already been reported to consumers. Reports the loss
|
|
203
|
+
* once per outage — `close` fires on every failed reconnection attempt — and tells the `ready`
|
|
204
|
+
* handler that a recovery, rather than a first connection, is what it is seeing.
|
|
205
|
+
*/
|
|
206
|
+
private _connectionLostEmitted;
|
|
207
|
+
/** As {@link _hasEverConnected}, for the subscriber connection. */
|
|
208
|
+
private _subscriberHasEverConnected;
|
|
164
209
|
private _enablePubSub;
|
|
165
210
|
private _subscriber;
|
|
166
211
|
private _pubSubChannel;
|
|
167
212
|
private _eventEmitter;
|
|
168
213
|
private _subscriberConnected;
|
|
214
|
+
/** Fully-qualified channel name -> handlers registered via {@link SubscribeToChannel}. */
|
|
215
|
+
private _channelHandlers;
|
|
216
|
+
/** Fully-qualified channel name -> the subscribe still in flight, shared by concurrent callers. */
|
|
217
|
+
private _pendingChannelSubscribes;
|
|
169
218
|
private _config;
|
|
170
219
|
/**
|
|
171
220
|
* Creates a new Redis local storage provider and establishes a connection.
|
|
@@ -211,12 +260,98 @@ export declare class RedisLocalStorageProvider implements ILocalStorageProvider
|
|
|
211
260
|
* @internal
|
|
212
261
|
*/
|
|
213
262
|
private retryStrategy;
|
|
263
|
+
/**
|
|
264
|
+
* Registers event handlers on the ioredis client for logging connection
|
|
265
|
+
* lifecycle events (connect, ready, close, error, reconnecting).
|
|
266
|
+
* @internal
|
|
267
|
+
*/
|
|
268
|
+
private handleClientConnect;
|
|
269
|
+
/**
|
|
270
|
+
* On `ready` the client can serve commands again. A recovery is identified by
|
|
271
|
+
* {@link _connectionLostEmitted} rather than by inspecting `_connected`: ioredis emits `connect`
|
|
272
|
+
* before `ready`, so by this point `_connected` has already been set back to true and cannot
|
|
273
|
+
* distinguish a reconnect from a first connection.
|
|
274
|
+
*
|
|
275
|
+
* @internal
|
|
276
|
+
*/
|
|
277
|
+
private handleClientReady;
|
|
278
|
+
/**
|
|
279
|
+
* `close` fires once per failed reconnection attempt, not only on the first drop, so the loss is
|
|
280
|
+
* announced through {@link noteConnectionLost} and reported once per outage.
|
|
281
|
+
*
|
|
282
|
+
* @internal
|
|
283
|
+
*/
|
|
284
|
+
private handleClientClose;
|
|
214
285
|
/**
|
|
215
286
|
* Registers event handlers on the ioredis client for logging connection
|
|
216
287
|
* lifecycle events (connect, ready, close, error, reconnecting).
|
|
217
288
|
* @internal
|
|
218
289
|
*/
|
|
219
290
|
private setupEventHandlers;
|
|
291
|
+
/**
|
|
292
|
+
* Whether a command should fail immediately instead of being handed to ioredis.
|
|
293
|
+
*
|
|
294
|
+
* True once a connection has been established and then lost. The clients set
|
|
295
|
+
* `maxRetriesPerRequest: null` and leave ioredis's offline queue enabled, so a command issued
|
|
296
|
+
* while disconnected is queued and its promise never settles — over a long outage that is
|
|
297
|
+
* unbounded memory and indefinitely hanging awaits. Callers instead get a miss from a read and
|
|
298
|
+
* a no-op from a write, both of which are correct and only slower.
|
|
299
|
+
*
|
|
300
|
+
* False before the first connection, so a brief queue can still warm the cache at startup.
|
|
301
|
+
* Nothing is stale at that point because nothing is cached.
|
|
302
|
+
*
|
|
303
|
+
* @internal
|
|
304
|
+
*/
|
|
305
|
+
private get shouldFailFast();
|
|
306
|
+
/**
|
|
307
|
+
* Records the highest epoch this process has observed, from either direction — a mutation it
|
|
308
|
+
* published, or an event it received. Monotonic: a late-arriving lower value is ignored.
|
|
309
|
+
* @internal
|
|
310
|
+
*/
|
|
311
|
+
private noteEpochSeen;
|
|
312
|
+
/**
|
|
313
|
+
* Records that shared state changed while this process could not tell anyone.
|
|
314
|
+
*
|
|
315
|
+
* Reconciliation has to be symmetric. The obvious direction is what this process MISSED, and the
|
|
316
|
+
* epoch comparison covers that. This is the other direction: writes this process made that its
|
|
317
|
+
* siblings never heard, which leave *them* confidently stale. On recovery the epoch is bumped so
|
|
318
|
+
* they flush too.
|
|
319
|
+
* @internal
|
|
320
|
+
*/
|
|
321
|
+
private noteMutationWhileDisconnected;
|
|
322
|
+
/**
|
|
323
|
+
* Decides whether this process's caches are still trustworthy after a reconnect, and flushes
|
|
324
|
+
* them if not.
|
|
325
|
+
*
|
|
326
|
+
* ioredis resubscribes on its own, but pub/sub has no replay: invalidations published while this
|
|
327
|
+
* process was disconnected are gone, so the cache may hold entries other servers have already
|
|
328
|
+
* invalidated. One read of the shared epoch counter settles it:
|
|
329
|
+
*
|
|
330
|
+
* - unchanged — nothing was invalidated anywhere during the gap, so the cache is kept
|
|
331
|
+
* - advanced — something changed and this process cannot know what, so everything is dropped
|
|
332
|
+
* - this process mutated while disconnected — the epoch is bumped so siblings flush too, and
|
|
333
|
+
* the cache is dropped here as well
|
|
334
|
+
*
|
|
335
|
+
* An epoch that cannot be read is treated as advanced: without evidence of correctness, flush.
|
|
336
|
+
*
|
|
337
|
+
* @internal
|
|
338
|
+
*/
|
|
339
|
+
private reconcileAfterReconnect;
|
|
340
|
+
/**
|
|
341
|
+
* Tells local consumers to drop everything they hold.
|
|
342
|
+
*
|
|
343
|
+
* Expressed as a `category_cleared` event per shared category rather than a new event type,
|
|
344
|
+
* because that action already means "assume nothing in this category is valid" and
|
|
345
|
+
* `LocalCacheManager.DispatchCacheChange` already fans it out to EVERY registered callback. A
|
|
346
|
+
* bespoke event would need every consumer taught about it; this one is understood today.
|
|
347
|
+
*
|
|
348
|
+
* `SourceServerId` is this process deliberately — the flush is local, and a sibling receiving it
|
|
349
|
+
* would filter it out as self-originated anyway since it is never published.
|
|
350
|
+
* @internal
|
|
351
|
+
*/
|
|
352
|
+
private requestLocalFlush;
|
|
353
|
+
/** The Redis key holding the fleet-wide invalidation counter. @internal */
|
|
354
|
+
private buildEpochKey;
|
|
220
355
|
/**
|
|
221
356
|
* Builds the full Redis key from a category and key name.
|
|
222
357
|
*
|
|
@@ -491,6 +626,48 @@ export declare class RedisLocalStorageProvider implements ILocalStorageProvider
|
|
|
491
626
|
* @internal
|
|
492
627
|
*/
|
|
493
628
|
private publishChange;
|
|
629
|
+
/**
|
|
630
|
+
* Publishes an arbitrary message on a named channel. Fire-and-forget: the promise is not
|
|
631
|
+
* awaited and a failure is logged rather than raised, so a caller on a hot path is never
|
|
632
|
+
* blocked or broken by the message bus.
|
|
633
|
+
*
|
|
634
|
+
* The channel is namespaced with the provider's key prefix, so several applications can share
|
|
635
|
+
* one Redis without hearing each other.
|
|
636
|
+
*
|
|
637
|
+
* @param channel Logical channel name (unprefixed).
|
|
638
|
+
* @param payload Message body. Serialize before calling — this layer is shape-agnostic.
|
|
639
|
+
*/
|
|
640
|
+
PublishMessage(channel: string, payload: string): void;
|
|
641
|
+
/**
|
|
642
|
+
* Registers a handler for messages on a named channel, starting the subscriber if needed.
|
|
643
|
+
*
|
|
644
|
+
* No echo suppression happens here — this layer does not know the payload shape. A publisher
|
|
645
|
+
* that needs it must stamp its own origin on the message and check it in the handler.
|
|
646
|
+
*
|
|
647
|
+
* @returns A function that removes this handler.
|
|
648
|
+
*/
|
|
649
|
+
SubscribeToChannel(channel: string, handler: (message: string) => void): Promise<() => void>;
|
|
650
|
+
/**
|
|
651
|
+
* The handler set for a channel, subscribing first when no caller has yet.
|
|
652
|
+
*
|
|
653
|
+
* Callers that arrive while a subscribe is in flight wait on that same subscribe. Each one
|
|
654
|
+
* starting its own would publish its own handler set, and the last to finish would replace
|
|
655
|
+
* the others' sets, so their handlers would never receive a message.
|
|
656
|
+
*/
|
|
657
|
+
private channelHandlersFor;
|
|
658
|
+
/**
|
|
659
|
+
* Subscribes to a channel and publishes its handler set.
|
|
660
|
+
*
|
|
661
|
+
* The set is registered only once the subscribe has succeeded. A map entry published ahead of
|
|
662
|
+
* the await would survive a rejection, and every later caller reads that entry as proof the
|
|
663
|
+
* channel is subscribed — registering handlers against a channel Redis is not listening on,
|
|
664
|
+
* with nothing surfaced.
|
|
665
|
+
*/
|
|
666
|
+
private subscribeChannel;
|
|
667
|
+
/** Routes an inbound message to the handlers registered for its channel. @internal */
|
|
668
|
+
private dispatchChannelMessage;
|
|
669
|
+
/** Namespaces a channel with the provider's key prefix. @internal */
|
|
670
|
+
private qualifyChannel;
|
|
494
671
|
/**
|
|
495
672
|
* Registers a callback for cache change events from other servers.
|
|
496
673
|
* The callback fires whenever another server instance modifies a cached entry
|
|
@@ -518,5 +695,94 @@ export declare class RedisLocalStorageProvider implements ILocalStorageProvider
|
|
|
518
695
|
* Whether the pub/sub subscriber connection is currently active.
|
|
519
696
|
*/
|
|
520
697
|
get IsSubscriberConnected(): boolean;
|
|
698
|
+
/**
|
|
699
|
+
* Registers a callback for the loss of the Redis connection.
|
|
700
|
+
*
|
|
701
|
+
* Fires on a transition only — not on the first connect, and not again while a reconnect is
|
|
702
|
+
* being retried. {@link IsConnected} reports the current state but not that it changed, so a
|
|
703
|
+
* consumer wanting to degrade or report health needs this rather than a poll.
|
|
704
|
+
*
|
|
705
|
+
* Use this in preference to reading the log: status-level logging is suppressed when
|
|
706
|
+
* `GetProductionStatus()` is true, so a deployed process says nothing when its cache client
|
|
707
|
+
* dies.
|
|
708
|
+
*
|
|
709
|
+
* @param callback - Invoked with a short human-readable reason for the loss
|
|
710
|
+
* @returns A function that removes this registration
|
|
711
|
+
*
|
|
712
|
+
* @example
|
|
713
|
+
* ```typescript
|
|
714
|
+
* const stop = provider.OnConnectionLost(reason => health.markCacheDown(reason));
|
|
715
|
+
* provider.OnConnectionRestored(() => health.markCacheUp());
|
|
716
|
+
* ```
|
|
717
|
+
*/
|
|
718
|
+
OnConnectionLost(callback: (reason: string) => void): () => void;
|
|
719
|
+
/**
|
|
720
|
+
* Registers a callback for the Redis connection being restored after a loss. Not fired for the
|
|
721
|
+
* first connection.
|
|
722
|
+
*
|
|
723
|
+
* Cache correctness after the gap is handled by the provider itself; see
|
|
724
|
+
* {@link OnReconciliationRequired} for the signal that local state had to be dropped.
|
|
725
|
+
*
|
|
726
|
+
* @param callback - Invoked when the connection comes back
|
|
727
|
+
* @returns A function that removes this registration
|
|
728
|
+
*/
|
|
729
|
+
OnConnectionRestored(callback: () => void): () => void;
|
|
730
|
+
/**
|
|
731
|
+
* Registers a callback for the provider having concluded, after a connection gap, that local
|
|
732
|
+
* cache state must be dropped.
|
|
733
|
+
*
|
|
734
|
+
* The standard categories are flushed by the provider itself via {@link OnCacheChanged}. Use
|
|
735
|
+
* this for state those categories do not describe — an in-process engine, a derived index, a
|
|
736
|
+
* memoized permission set — which would otherwise survive a reconnect while stale.
|
|
737
|
+
*
|
|
738
|
+
* Does not fire when nothing was invalidated anywhere during the gap.
|
|
739
|
+
*
|
|
740
|
+
* @param callback - Invoked when a flush is required
|
|
741
|
+
* @returns A function that removes this registration
|
|
742
|
+
*/
|
|
743
|
+
OnReconciliationRequired(callback: () => void): () => void;
|
|
744
|
+
/**
|
|
745
|
+
* The highest fleet-wide epoch this process has observed. Exposed for diagnostics and for tests
|
|
746
|
+
* that need to assert what reconciliation decided; consumers should not need it.
|
|
747
|
+
*/
|
|
748
|
+
get LastSeenEpoch(): number;
|
|
749
|
+
/**
|
|
750
|
+
* Reports a lost connection once per outage.
|
|
751
|
+
*
|
|
752
|
+
* Both routes into this are repeatable: `close` fires on every failed reconnection attempt, and an
|
|
753
|
+
* exhausted retry ceiling arrives separately after one. Consumers get a single notification, and
|
|
754
|
+
* the next `ready` clears the latch so the following outage reports again.
|
|
755
|
+
*
|
|
756
|
+
* @internal
|
|
757
|
+
*/
|
|
758
|
+
private noteConnectionLost;
|
|
759
|
+
/**
|
|
760
|
+
* Raises the public lost-connection event and logs it.
|
|
761
|
+
*
|
|
762
|
+
* Uses the error channel, and is not gated behind `enableLogging`: status-level output is
|
|
763
|
+
* suppressed in production and that flag is routinely turned off, either of which would leave a
|
|
764
|
+
* dead cache client silent.
|
|
765
|
+
*
|
|
766
|
+
* @internal
|
|
767
|
+
*/
|
|
768
|
+
private emitConnectionLost;
|
|
769
|
+
/**
|
|
770
|
+
* Raises the public restored-connection event and logs it, on the error channel for the same
|
|
771
|
+
* reason as the loss — otherwise the logs show an outage that never ends.
|
|
772
|
+
*
|
|
773
|
+
* @internal
|
|
774
|
+
*/
|
|
775
|
+
private emitConnectionRestored;
|
|
776
|
+
/**
|
|
777
|
+
* Emits to consumer callbacks, containing each listener's errors so that neither the connection
|
|
778
|
+
* handling that triggered the event nor the other listeners are affected.
|
|
779
|
+
*
|
|
780
|
+
* Invokes listeners individually rather than through `EventEmitter.emit`, which calls them
|
|
781
|
+
* synchronously in turn: one throwing there would stop every listener after it from running at
|
|
782
|
+
* all.
|
|
783
|
+
*
|
|
784
|
+
* @internal
|
|
785
|
+
*/
|
|
786
|
+
private safeEmit;
|
|
521
787
|
}
|
|
522
788
|
//# sourceMappingURL=RedisLocalStorageProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedisLocalStorageProvider.d.ts","sourceRoot":"","sources":["../src/RedisLocalStorageProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,EAAE,qBAAqB,EAAuB,MAAM,sBAAsB,CAAC;AAClF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,mBAAmB;IAChC;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;;OAKG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IAEvB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B
|
|
1
|
+
{"version":3,"file":"RedisLocalStorageProvider.d.ts","sourceRoot":"","sources":["../src/RedisLocalStorageProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,EAAE,qBAAqB,EAAuB,MAAM,sBAAsB,CAAC;AAClF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,mBAAmB;IAChC;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;;OAKG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IAEvB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,MAAM,CAA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AK,IAAI,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC;IAgBzG;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;IAgB1B;;;;;;;OAOG;YACW,gBAAgB;IAU9B,sFAAsF;IACtF,OAAO,CAAC,sBAAsB;IAgB9B,qEAAqE;IACrE,OAAO,CAAC,cAAc;IAItB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACI,cAAc,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,GAAG,MAAM,IAAI;IAQ/E;;OAEG;IACH,IAAW,qBAAqB,IAAI,OAAO,CAE1C;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACI,gBAAgB,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI;IAOvE;;;;;;;;;OASG;IACI,oBAAoB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAO7D;;;;;;;;;;;;OAYG;IACI,wBAAwB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAOjE;;;OAGG;IACH,IAAW,aAAa,IAAI,MAAM,CAEjC;IAED;;;;;;;;OAQG;IACH,OAAO,CAAC,kBAAkB;IAQ1B;;;;;;;;OAQG;IACH,OAAO,CAAC,kBAAkB;IAK1B;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IAK9B;;;;;;;;;OASG;IACH,OAAO,CAAC,QAAQ;CASnB"}
|
|
@@ -22,6 +22,14 @@ import { MJGlobal } from '@memberjunction/global';
|
|
|
22
22
|
* @internal
|
|
23
23
|
*/
|
|
24
24
|
const DEFAULT_CATEGORY = 'default';
|
|
25
|
+
/**
|
|
26
|
+
* The categories a reconnect-flush clears.
|
|
27
|
+
*
|
|
28
|
+
* Mirrors `CacheCategory` from `@memberjunction/core` as literals rather than importing it, so the
|
|
29
|
+
* provider takes no value dependency on that module and a category added there cannot change
|
|
30
|
+
* recovery behaviour here without an edit to this list.
|
|
31
|
+
*/
|
|
32
|
+
const RECONCILED_CATEGORIES = ['RunViewCache', 'RunQueryCache', 'DatasetCache', 'Metadata', 'default'];
|
|
25
33
|
/**
|
|
26
34
|
* Redis-backed implementation of the MemberJunction {@link ILocalStorageProvider} interface.
|
|
27
35
|
*
|
|
@@ -107,17 +115,55 @@ export class RedisLocalStorageProvider {
|
|
|
107
115
|
* See {@link ILocalStorageProvider.SharesReferences}.
|
|
108
116
|
*/
|
|
109
117
|
this.SharesReferences = false;
|
|
118
|
+
/**
|
|
119
|
+
* `true` — that is the whole point of this provider: every server in the fleet reads what any
|
|
120
|
+
* other wrote. See {@link ILocalStorageProvider.SupportsCrossProcessPersistence}.
|
|
121
|
+
*/
|
|
122
|
+
this.SupportsCrossProcessPersistence = true;
|
|
110
123
|
this._connected = false;
|
|
124
|
+
/**
|
|
125
|
+
* Whether this client has ever been connected. Distinguishes a startup that has not reached
|
|
126
|
+
* Redis yet, where queueing a command is useful, from a connection that was lost, where
|
|
127
|
+
* {@link shouldFailFast} applies.
|
|
128
|
+
*/
|
|
129
|
+
this._hasEverConnected = false;
|
|
130
|
+
/**
|
|
131
|
+
* The highest shared epoch this process has seen, from its own mutations and from events
|
|
132
|
+
* received. {@link reconcileAfterReconnect} compares it against the value in Redis to decide
|
|
133
|
+
* whether anything was invalidated during a connection gap.
|
|
134
|
+
*/
|
|
135
|
+
this._lastSeenEpoch = 0;
|
|
136
|
+
/**
|
|
137
|
+
* Whether this process mutated shared state while disconnected, meaning other servers never
|
|
138
|
+
* received those invalidations. Set so {@link reconcileAfterReconnect} can bump the epoch on
|
|
139
|
+
* recovery and make them flush.
|
|
140
|
+
*/
|
|
141
|
+
this._mutatedWhileDisconnected = false;
|
|
142
|
+
/** Guards against two overlapping reconciliations (client and subscriber both recover). */
|
|
143
|
+
this._reconciling = false;
|
|
144
|
+
/**
|
|
145
|
+
* Whether the loss of this connection has already been reported to consumers. Reports the loss
|
|
146
|
+
* once per outage — `close` fires on every failed reconnection attempt — and tells the `ready`
|
|
147
|
+
* handler that a recovery, rather than a first connection, is what it is seeing.
|
|
148
|
+
*/
|
|
149
|
+
this._connectionLostEmitted = false;
|
|
150
|
+
/** As {@link _hasEverConnected}, for the subscriber connection. */
|
|
151
|
+
this._subscriberHasEverConnected = false;
|
|
111
152
|
this._subscriber = null;
|
|
112
153
|
this._eventEmitter = new EventEmitter();
|
|
113
154
|
this._subscriberConnected = false;
|
|
155
|
+
/** Fully-qualified channel name -> handlers registered via {@link SubscribeToChannel}. */
|
|
156
|
+
this._channelHandlers = new Map();
|
|
157
|
+
/** Fully-qualified channel name -> the subscribe still in flight, shared by concurrent callers. */
|
|
158
|
+
this._pendingChannelSubscribes = new Map();
|
|
114
159
|
this._config = config;
|
|
115
160
|
this._keyPrefix = config.keyPrefix ?? 'mj';
|
|
116
161
|
this._defaultTTLSeconds = config.defaultTTLSeconds;
|
|
117
162
|
this._enableLogging = config.enableLogging ?? true;
|
|
163
|
+
this._maxRetryDelayMs = config.maxRetryDelayMs ?? 30000;
|
|
118
164
|
this._enablePubSub = config.enablePubSub ?? false;
|
|
119
165
|
this._pubSubChannel = `${this._keyPrefix}:__pubsub__`;
|
|
120
|
-
const maxRetries = config.maxRetries
|
|
166
|
+
const maxRetries = config.maxRetries; // undefined = retry forever, with a capped delay
|
|
121
167
|
if (config.url) {
|
|
122
168
|
this._client = new Redis(config.url, {
|
|
123
169
|
maxRetriesPerRequest: null,
|
|
@@ -148,43 +194,78 @@ export class RedisLocalStorageProvider {
|
|
|
148
194
|
* @internal
|
|
149
195
|
*/
|
|
150
196
|
retryStrategy(times, maxRetries) {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
197
|
+
// Returning null stops ioredis reconnecting for the life of the client, recoverable only by
|
|
198
|
+
// restarting the process, so only an explicit maxRetries gets that.
|
|
199
|
+
if (maxRetries !== undefined && times > maxRetries) {
|
|
200
|
+
// Error channel: status output is suppressed in production, and this is the one message
|
|
201
|
+
// that must reach a deployed log.
|
|
202
|
+
LogError(`Redis: max retries (${maxRetries}) exceeded after ${times} attempts — giving up permanently. ` +
|
|
203
|
+
`This process is now cache-blind until it restarts. Omit maxRetries to retry forever with a capped delay.`);
|
|
204
|
+
this.noteConnectionLost('retries exhausted');
|
|
155
205
|
return null;
|
|
156
206
|
}
|
|
157
|
-
//
|
|
158
|
-
const delay = Math.min(
|
|
207
|
+
// 200, 400, 800, 1600 … then held at maxRetryDelayMs.
|
|
208
|
+
const delay = Math.min(200 * Math.pow(2, times - 1), this._maxRetryDelayMs);
|
|
159
209
|
if (this._enableLogging) {
|
|
160
|
-
|
|
210
|
+
const ceiling = maxRetries === undefined ? 'no limit' : `${maxRetries}`;
|
|
211
|
+
LogStatus(`Redis: reconnecting in ${delay}ms (attempt ${times}, limit ${ceiling})`);
|
|
161
212
|
}
|
|
162
213
|
return delay;
|
|
163
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* Registers event handlers on the ioredis client for logging connection
|
|
217
|
+
* lifecycle events (connect, ready, close, error, reconnecting).
|
|
218
|
+
* @internal
|
|
219
|
+
*/
|
|
220
|
+
handleClientConnect() {
|
|
221
|
+
this._connected = true;
|
|
222
|
+
if (this._enableLogging) {
|
|
223
|
+
LogStatus('Redis: connected');
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* On `ready` the client can serve commands again. A recovery is identified by
|
|
228
|
+
* {@link _connectionLostEmitted} rather than by inspecting `_connected`: ioredis emits `connect`
|
|
229
|
+
* before `ready`, so by this point `_connected` has already been set back to true and cannot
|
|
230
|
+
* distinguish a reconnect from a first connection.
|
|
231
|
+
*
|
|
232
|
+
* @internal
|
|
233
|
+
*/
|
|
234
|
+
handleClientReady() {
|
|
235
|
+
this._connected = true;
|
|
236
|
+
this._hasEverConnected = true;
|
|
237
|
+
if (this._enableLogging) {
|
|
238
|
+
LogStatus('Redis: ready to accept commands');
|
|
239
|
+
}
|
|
240
|
+
if (this._connectionLostEmitted) {
|
|
241
|
+
this._connectionLostEmitted = false;
|
|
242
|
+
this.emitConnectionRestored();
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* `close` fires once per failed reconnection attempt, not only on the first drop, so the loss is
|
|
247
|
+
* announced through {@link noteConnectionLost} and reported once per outage.
|
|
248
|
+
*
|
|
249
|
+
* @internal
|
|
250
|
+
*/
|
|
251
|
+
handleClientClose() {
|
|
252
|
+
this._connected = false;
|
|
253
|
+
if (this._enableLogging) {
|
|
254
|
+
LogStatus('Redis: connection closed');
|
|
255
|
+
}
|
|
256
|
+
if (this._hasEverConnected) {
|
|
257
|
+
this.noteConnectionLost('connection closed');
|
|
258
|
+
}
|
|
259
|
+
}
|
|
164
260
|
/**
|
|
165
261
|
* Registers event handlers on the ioredis client for logging connection
|
|
166
262
|
* lifecycle events (connect, ready, close, error, reconnecting).
|
|
167
263
|
* @internal
|
|
168
264
|
*/
|
|
169
265
|
setupEventHandlers() {
|
|
170
|
-
this._client.on('connect', () =>
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
LogStatus('Redis: connected');
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
this._client.on('ready', () => {
|
|
177
|
-
this._connected = true;
|
|
178
|
-
if (this._enableLogging) {
|
|
179
|
-
LogStatus('Redis: ready to accept commands');
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
this._client.on('close', () => {
|
|
183
|
-
this._connected = false;
|
|
184
|
-
if (this._enableLogging) {
|
|
185
|
-
LogStatus('Redis: connection closed');
|
|
186
|
-
}
|
|
187
|
-
});
|
|
266
|
+
this._client.on('connect', () => this.handleClientConnect());
|
|
267
|
+
this._client.on('ready', () => this.handleClientReady());
|
|
268
|
+
this._client.on('close', () => this.handleClientClose());
|
|
188
269
|
this._client.on('error', (err) => {
|
|
189
270
|
if (this._enableLogging) {
|
|
190
271
|
LogError(`Redis: ${err.message}`);
|
|
@@ -196,6 +277,141 @@ export class RedisLocalStorageProvider {
|
|
|
196
277
|
}
|
|
197
278
|
});
|
|
198
279
|
}
|
|
280
|
+
/**
|
|
281
|
+
* Whether a command should fail immediately instead of being handed to ioredis.
|
|
282
|
+
*
|
|
283
|
+
* True once a connection has been established and then lost. The clients set
|
|
284
|
+
* `maxRetriesPerRequest: null` and leave ioredis's offline queue enabled, so a command issued
|
|
285
|
+
* while disconnected is queued and its promise never settles — over a long outage that is
|
|
286
|
+
* unbounded memory and indefinitely hanging awaits. Callers instead get a miss from a read and
|
|
287
|
+
* a no-op from a write, both of which are correct and only slower.
|
|
288
|
+
*
|
|
289
|
+
* False before the first connection, so a brief queue can still warm the cache at startup.
|
|
290
|
+
* Nothing is stale at that point because nothing is cached.
|
|
291
|
+
*
|
|
292
|
+
* @internal
|
|
293
|
+
*/
|
|
294
|
+
get shouldFailFast() {
|
|
295
|
+
return this._hasEverConnected && !this._connected;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Records the highest epoch this process has observed, from either direction — a mutation it
|
|
299
|
+
* published, or an event it received. Monotonic: a late-arriving lower value is ignored.
|
|
300
|
+
* @internal
|
|
301
|
+
*/
|
|
302
|
+
noteEpochSeen(epoch) {
|
|
303
|
+
if (typeof epoch === 'number' && epoch > this._lastSeenEpoch) {
|
|
304
|
+
this._lastSeenEpoch = epoch;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Records that shared state changed while this process could not tell anyone.
|
|
309
|
+
*
|
|
310
|
+
* Reconciliation has to be symmetric. The obvious direction is what this process MISSED, and the
|
|
311
|
+
* epoch comparison covers that. This is the other direction: writes this process made that its
|
|
312
|
+
* siblings never heard, which leave *them* confidently stale. On recovery the epoch is bumped so
|
|
313
|
+
* they flush too.
|
|
314
|
+
* @internal
|
|
315
|
+
*/
|
|
316
|
+
noteMutationWhileDisconnected() {
|
|
317
|
+
this._mutatedWhileDisconnected = true;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Decides whether this process's caches are still trustworthy after a reconnect, and flushes
|
|
321
|
+
* them if not.
|
|
322
|
+
*
|
|
323
|
+
* ioredis resubscribes on its own, but pub/sub has no replay: invalidations published while this
|
|
324
|
+
* process was disconnected are gone, so the cache may hold entries other servers have already
|
|
325
|
+
* invalidated. One read of the shared epoch counter settles it:
|
|
326
|
+
*
|
|
327
|
+
* - unchanged — nothing was invalidated anywhere during the gap, so the cache is kept
|
|
328
|
+
* - advanced — something changed and this process cannot know what, so everything is dropped
|
|
329
|
+
* - this process mutated while disconnected — the epoch is bumped so siblings flush too, and
|
|
330
|
+
* the cache is dropped here as well
|
|
331
|
+
*
|
|
332
|
+
* An epoch that cannot be read is treated as advanced: without evidence of correctness, flush.
|
|
333
|
+
*
|
|
334
|
+
* @internal
|
|
335
|
+
*/
|
|
336
|
+
async reconcileAfterReconnect() {
|
|
337
|
+
if (!this._enablePubSub || this._reconciling) {
|
|
338
|
+
return; // no cross-server invalidation to reconcile, or already in progress
|
|
339
|
+
}
|
|
340
|
+
this._reconciling = true;
|
|
341
|
+
try {
|
|
342
|
+
const dirty = this._mutatedWhileDisconnected;
|
|
343
|
+
this._mutatedWhileDisconnected = false;
|
|
344
|
+
let current;
|
|
345
|
+
if (dirty) {
|
|
346
|
+
// Make siblings flush: our writes never reached them.
|
|
347
|
+
current = await this._client.incr(this.buildEpochKey());
|
|
348
|
+
}
|
|
349
|
+
else {
|
|
350
|
+
const raw = await this._client.get(this.buildEpochKey());
|
|
351
|
+
current = raw === null ? 0 : Number(raw);
|
|
352
|
+
if (!Number.isFinite(current)) {
|
|
353
|
+
throw new Error(`epoch key held a non-numeric value: ${JSON.stringify(raw)}`);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
// Any DIFFERENCE means flush, not only an advance. A lower value is not "no change": the
|
|
357
|
+
// counter is gone — cleared, evicted under maxmemory, or a different instance — and what
|
|
358
|
+
// happened before that is unknowable. Inequality also bounds the damage a peer can do by
|
|
359
|
+
// publishing an absurd epoch, since a later real value differs from it and flushes.
|
|
360
|
+
const suspect = dirty || current !== this._lastSeenEpoch;
|
|
361
|
+
if (!suspect) {
|
|
362
|
+
if (this._enableLogging) {
|
|
363
|
+
// Status, not the error channel: this is the routine outcome and says nothing
|
|
364
|
+
// happened. Only the decisions that DROP a cache are worth an operator's log.
|
|
365
|
+
LogStatus(`[Redis] reconciled after reconnect: epoch unchanged at ${current} — nothing was ` +
|
|
366
|
+
`invalidated while this process was away, so the local cache is kept`);
|
|
367
|
+
}
|
|
368
|
+
return;
|
|
369
|
+
}
|
|
370
|
+
LogError(`[Redis] reconciled after reconnect: epoch ${this._lastSeenEpoch} → ${current}` +
|
|
371
|
+
`${dirty ? ' (this process also mutated while disconnected, so siblings were told to flush)' : ''}` +
|
|
372
|
+
` — dropping local cache`);
|
|
373
|
+
this._lastSeenEpoch = current;
|
|
374
|
+
this.requestLocalFlush();
|
|
375
|
+
}
|
|
376
|
+
catch (err) {
|
|
377
|
+
// Could not establish correctness; flush rather than trust.
|
|
378
|
+
LogError(`[Redis] reconciliation could not read the epoch (${err.message}) — flushing local cache to be safe`);
|
|
379
|
+
this.requestLocalFlush();
|
|
380
|
+
}
|
|
381
|
+
finally {
|
|
382
|
+
this._reconciling = false;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Tells local consumers to drop everything they hold.
|
|
387
|
+
*
|
|
388
|
+
* Expressed as a `category_cleared` event per shared category rather than a new event type,
|
|
389
|
+
* because that action already means "assume nothing in this category is valid" and
|
|
390
|
+
* `LocalCacheManager.DispatchCacheChange` already fans it out to EVERY registered callback. A
|
|
391
|
+
* bespoke event would need every consumer taught about it; this one is understood today.
|
|
392
|
+
*
|
|
393
|
+
* `SourceServerId` is this process deliberately — the flush is local, and a sibling receiving it
|
|
394
|
+
* would filter it out as self-originated anyway since it is never published.
|
|
395
|
+
* @internal
|
|
396
|
+
*/
|
|
397
|
+
requestLocalFlush() {
|
|
398
|
+
for (const category of RECONCILED_CATEGORIES) {
|
|
399
|
+
const event = {
|
|
400
|
+
CacheKey: category,
|
|
401
|
+
Category: category,
|
|
402
|
+
Action: 'category_cleared',
|
|
403
|
+
Timestamp: Date.now(),
|
|
404
|
+
SourceServerId: MJGlobal.Instance.ProcessUUID,
|
|
405
|
+
Epoch: this._lastSeenEpoch,
|
|
406
|
+
};
|
|
407
|
+
this.safeEmit('cacheChanged', event);
|
|
408
|
+
}
|
|
409
|
+
this.safeEmit('reconciliationRequired');
|
|
410
|
+
}
|
|
411
|
+
/** The Redis key holding the fleet-wide invalidation counter. @internal */
|
|
412
|
+
buildEpochKey() {
|
|
413
|
+
return `${this._keyPrefix}:__epoch__`;
|
|
414
|
+
}
|
|
199
415
|
/**
|
|
200
416
|
* Builds the full Redis key from a category and key name.
|
|
201
417
|
*
|
|
@@ -242,6 +458,9 @@ export class RedisLocalStorageProvider {
|
|
|
242
458
|
* ```
|
|
243
459
|
*/
|
|
244
460
|
async GetItem(key, category) {
|
|
461
|
+
if (this.shouldFailFast) {
|
|
462
|
+
return null; // a miss: the caller refetches from the source of truth
|
|
463
|
+
}
|
|
245
464
|
try {
|
|
246
465
|
const redisKey = this.buildKey(key, category ?? DEFAULT_CATEGORY);
|
|
247
466
|
const raw = await this._client.get(redisKey);
|
|
@@ -282,6 +501,12 @@ export class RedisLocalStorageProvider {
|
|
|
282
501
|
const out = new Map();
|
|
283
502
|
if (keys.length === 0)
|
|
284
503
|
return out;
|
|
504
|
+
if (this.shouldFailFast) {
|
|
505
|
+
// Every key a miss — same answer MGET would give for absent keys.
|
|
506
|
+
for (const k of keys)
|
|
507
|
+
out.set(k, null);
|
|
508
|
+
return out;
|
|
509
|
+
}
|
|
285
510
|
try {
|
|
286
511
|
const cat = category ?? DEFAULT_CATEGORY;
|
|
287
512
|
const uniqueKeys = Array.from(new Set(keys));
|
|
@@ -349,6 +574,10 @@ export class RedisLocalStorageProvider {
|
|
|
349
574
|
* ```
|
|
350
575
|
*/
|
|
351
576
|
async SetItem(key, value, category, ttlSeconds) {
|
|
577
|
+
if (this.shouldFailFast) {
|
|
578
|
+
this.noteMutationWhileDisconnected();
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
352
581
|
try {
|
|
353
582
|
const cat = category ?? DEFAULT_CATEGORY;
|
|
354
583
|
const redisKey = this.buildKey(key, cat);
|
|
@@ -398,6 +627,10 @@ export class RedisLocalStorageProvider {
|
|
|
398
627
|
* ```
|
|
399
628
|
*/
|
|
400
629
|
async Remove(key, category) {
|
|
630
|
+
if (this.shouldFailFast) {
|
|
631
|
+
this.noteMutationWhileDisconnected();
|
|
632
|
+
return;
|
|
633
|
+
}
|
|
401
634
|
try {
|
|
402
635
|
const cat = category ?? DEFAULT_CATEGORY;
|
|
403
636
|
const redisKey = this.buildKey(key, cat);
|
|
@@ -430,6 +663,10 @@ export class RedisLocalStorageProvider {
|
|
|
430
663
|
* ```
|
|
431
664
|
*/
|
|
432
665
|
async ClearCategory(category) {
|
|
666
|
+
if (this.shouldFailFast) {
|
|
667
|
+
this.noteMutationWhileDisconnected();
|
|
668
|
+
return;
|
|
669
|
+
}
|
|
433
670
|
try {
|
|
434
671
|
const cat = category || DEFAULT_CATEGORY;
|
|
435
672
|
const categorySetKey = this.buildCategorySetKey(cat);
|
|
@@ -475,6 +712,9 @@ export class RedisLocalStorageProvider {
|
|
|
475
712
|
* ```
|
|
476
713
|
*/
|
|
477
714
|
async GetCategoryKeys(category) {
|
|
715
|
+
if (this.shouldFailFast) {
|
|
716
|
+
return []; // unknown rather than wrong: the caller treats it as nothing cached
|
|
717
|
+
}
|
|
478
718
|
try {
|
|
479
719
|
const cat = category || DEFAULT_CATEGORY;
|
|
480
720
|
const categorySetKey = this.buildCategorySetKey(cat);
|
|
@@ -545,6 +785,7 @@ export class RedisLocalStorageProvider {
|
|
|
545
785
|
}
|
|
546
786
|
// Remove all event listeners
|
|
547
787
|
this._eventEmitter.removeAllListeners();
|
|
788
|
+
this._channelHandlers.clear();
|
|
548
789
|
try {
|
|
549
790
|
await this._client.quit();
|
|
550
791
|
this._connected = false;
|
|
@@ -580,6 +821,9 @@ export class RedisLocalStorageProvider {
|
|
|
580
821
|
* ```
|
|
581
822
|
*/
|
|
582
823
|
async Exists(key, category) {
|
|
824
|
+
if (this.shouldFailFast) {
|
|
825
|
+
return false; // nothing is reachable, so nothing is cached as far as the caller is concerned
|
|
826
|
+
}
|
|
583
827
|
try {
|
|
584
828
|
const redisKey = this.buildKey(key, category ?? DEFAULT_CATEGORY);
|
|
585
829
|
const result = await this._client.exists(redisKey);
|
|
@@ -609,6 +853,9 @@ export class RedisLocalStorageProvider {
|
|
|
609
853
|
* ```
|
|
610
854
|
*/
|
|
611
855
|
async GetTTL(key, category) {
|
|
856
|
+
if (this.shouldFailFast) {
|
|
857
|
+
return null; // unknown, which is what the catch below reports for an unreachable server
|
|
858
|
+
}
|
|
612
859
|
try {
|
|
613
860
|
const redisKey = this.buildKey(key, category ?? DEFAULT_CATEGORY);
|
|
614
861
|
return await this._client.ttl(redisKey);
|
|
@@ -687,10 +934,11 @@ export class RedisLocalStorageProvider {
|
|
|
687
934
|
LogStatus(`Redis pub/sub: subscribed to channel "${this._pubSubChannel}"`);
|
|
688
935
|
}
|
|
689
936
|
this._subscriber.on('message', (channel, message) => {
|
|
690
|
-
if (channel
|
|
937
|
+
if (channel === this._pubSubChannel) {
|
|
938
|
+
this.handlePubSubMessage(message);
|
|
691
939
|
return;
|
|
692
940
|
}
|
|
693
|
-
this.
|
|
941
|
+
this.dispatchChannelMessage(channel, message);
|
|
694
942
|
});
|
|
695
943
|
}
|
|
696
944
|
/**
|
|
@@ -698,7 +946,7 @@ export class RedisLocalStorageProvider {
|
|
|
698
946
|
* @internal
|
|
699
947
|
*/
|
|
700
948
|
createSubscriberClient() {
|
|
701
|
-
const maxRetries = this._config.maxRetries
|
|
949
|
+
const maxRetries = this._config.maxRetries; // undefined = retry forever, with a capped delay
|
|
702
950
|
if (this._config.url) {
|
|
703
951
|
return new Redis(this._config.url, {
|
|
704
952
|
maxRetriesPerRequest: null,
|
|
@@ -723,13 +971,24 @@ export class RedisLocalStorageProvider {
|
|
|
723
971
|
if (!this._subscriber)
|
|
724
972
|
return;
|
|
725
973
|
this._subscriber.on('connect', () => {
|
|
974
|
+
const wasDown = this._subscriberHasEverConnected && !this._subscriberConnected;
|
|
726
975
|
this._subscriberConnected = true;
|
|
976
|
+
this._subscriberHasEverConnected = true;
|
|
727
977
|
if (this._enableLogging) {
|
|
728
978
|
LogStatus('Redis pub/sub subscriber: connected');
|
|
729
979
|
}
|
|
980
|
+
// Reconciliation hangs off the subscriber because that is the connection which misses
|
|
981
|
+
// invalidations. ioredis resubscribes, but cannot replay what it missed.
|
|
982
|
+
if (wasDown) {
|
|
983
|
+
void this.reconcileAfterReconnect();
|
|
984
|
+
}
|
|
730
985
|
});
|
|
731
986
|
this._subscriber.on('close', () => {
|
|
987
|
+
const wasUp = this._subscriberConnected;
|
|
732
988
|
this._subscriberConnected = false;
|
|
989
|
+
if (wasUp) {
|
|
990
|
+
LogError('[Redis] pub/sub subscriber disconnected — invalidations from other servers are not arriving');
|
|
991
|
+
}
|
|
733
992
|
});
|
|
734
993
|
this._subscriber.on('error', (err) => {
|
|
735
994
|
if (this._enableLogging) {
|
|
@@ -745,6 +1004,9 @@ export class RedisLocalStorageProvider {
|
|
|
745
1004
|
handlePubSubMessage(message) {
|
|
746
1005
|
try {
|
|
747
1006
|
const event = JSON.parse(message);
|
|
1007
|
+
// Before the self-filter below: any event reaching this subscriber shows how far the
|
|
1008
|
+
// shared counter has advanced, regardless of who published it.
|
|
1009
|
+
this.noteEpochSeen(event.Epoch);
|
|
748
1010
|
// Skip events from this server instance
|
|
749
1011
|
if (event.SourceServerId === MJGlobal.Instance.ProcessUUID) {
|
|
750
1012
|
return;
|
|
@@ -784,18 +1046,129 @@ export class RedisLocalStorageProvider {
|
|
|
784
1046
|
SourceServerId: MJGlobal.Instance.ProcessUUID,
|
|
785
1047
|
Data: data,
|
|
786
1048
|
};
|
|
787
|
-
//
|
|
788
|
-
|
|
789
|
-
|
|
1049
|
+
// Bump the shared epoch, then publish carrying its new value. The counter lives here
|
|
1050
|
+
// because every mutation already routes through this method. INCR has to precede PUBLISH so
|
|
1051
|
+
// the payload can carry the result, which costs a second round trip — off the caller's path,
|
|
1052
|
+
// since this method is fire-and-forget.
|
|
1053
|
+
this._client.incr(this.buildEpochKey()).then((epoch) => {
|
|
1054
|
+
this.noteEpochSeen(epoch);
|
|
1055
|
+
event.Epoch = epoch;
|
|
1056
|
+
return this._client.publish(this._pubSubChannel, JSON.stringify(event));
|
|
1057
|
+
}).then(() => {
|
|
790
1058
|
if (this._enableLogging) {
|
|
791
1059
|
LogStatus(`Redis pub/sub: published ${action} event for key "${cacheKey}" on channel "${this._pubSubChannel}"`);
|
|
792
1060
|
}
|
|
793
1061
|
}).catch((err) => {
|
|
1062
|
+
// Nobody heard this change, so record it for reconcileAfterReconnect to bump the epoch
|
|
1063
|
+
// on recovery and make the other servers flush.
|
|
1064
|
+
this.noteMutationWhileDisconnected();
|
|
794
1065
|
if (this._enableLogging) {
|
|
795
1066
|
LogError(`Redis pub/sub publish failed: ${err.message}`);
|
|
796
1067
|
}
|
|
797
1068
|
});
|
|
798
1069
|
}
|
|
1070
|
+
/**
|
|
1071
|
+
* Publishes an arbitrary message on a named channel. Fire-and-forget: the promise is not
|
|
1072
|
+
* awaited and a failure is logged rather than raised, so a caller on a hot path is never
|
|
1073
|
+
* blocked or broken by the message bus.
|
|
1074
|
+
*
|
|
1075
|
+
* The channel is namespaced with the provider's key prefix, so several applications can share
|
|
1076
|
+
* one Redis without hearing each other.
|
|
1077
|
+
*
|
|
1078
|
+
* @param channel Logical channel name (unprefixed).
|
|
1079
|
+
* @param payload Message body. Serialize before calling — this layer is shape-agnostic.
|
|
1080
|
+
*/
|
|
1081
|
+
PublishMessage(channel, payload) {
|
|
1082
|
+
if (!this._enablePubSub) {
|
|
1083
|
+
return;
|
|
1084
|
+
}
|
|
1085
|
+
const fullChannel = this.qualifyChannel(channel);
|
|
1086
|
+
this._client.publish(fullChannel, payload).catch((err) => {
|
|
1087
|
+
if (this._enableLogging) {
|
|
1088
|
+
LogError(`Redis pub/sub publish failed on "${fullChannel}": ${err.message}`);
|
|
1089
|
+
}
|
|
1090
|
+
});
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* Registers a handler for messages on a named channel, starting the subscriber if needed.
|
|
1094
|
+
*
|
|
1095
|
+
* No echo suppression happens here — this layer does not know the payload shape. A publisher
|
|
1096
|
+
* that needs it must stamp its own origin on the message and check it in the handler.
|
|
1097
|
+
*
|
|
1098
|
+
* @returns A function that removes this handler.
|
|
1099
|
+
*/
|
|
1100
|
+
async SubscribeToChannel(channel, handler) {
|
|
1101
|
+
if (!this._enablePubSub) {
|
|
1102
|
+
return () => undefined;
|
|
1103
|
+
}
|
|
1104
|
+
await this.StartListening();
|
|
1105
|
+
const fullChannel = this.qualifyChannel(channel);
|
|
1106
|
+
const handlers = await this.channelHandlersFor(fullChannel);
|
|
1107
|
+
handlers.add(handler);
|
|
1108
|
+
return () => {
|
|
1109
|
+
handlers.delete(handler);
|
|
1110
|
+
};
|
|
1111
|
+
}
|
|
1112
|
+
/**
|
|
1113
|
+
* The handler set for a channel, subscribing first when no caller has yet.
|
|
1114
|
+
*
|
|
1115
|
+
* Callers that arrive while a subscribe is in flight wait on that same subscribe. Each one
|
|
1116
|
+
* starting its own would publish its own handler set, and the last to finish would replace
|
|
1117
|
+
* the others' sets, so their handlers would never receive a message.
|
|
1118
|
+
*/
|
|
1119
|
+
channelHandlersFor(fullChannel) {
|
|
1120
|
+
const existing = this._channelHandlers.get(fullChannel);
|
|
1121
|
+
if (existing) {
|
|
1122
|
+
return Promise.resolve(existing);
|
|
1123
|
+
}
|
|
1124
|
+
const pending = this._pendingChannelSubscribes.get(fullChannel);
|
|
1125
|
+
if (pending) {
|
|
1126
|
+
return pending;
|
|
1127
|
+
}
|
|
1128
|
+
const subscribing = this.subscribeChannel(fullChannel).finally(() => {
|
|
1129
|
+
this._pendingChannelSubscribes.delete(fullChannel);
|
|
1130
|
+
});
|
|
1131
|
+
this._pendingChannelSubscribes.set(fullChannel, subscribing);
|
|
1132
|
+
return subscribing;
|
|
1133
|
+
}
|
|
1134
|
+
/**
|
|
1135
|
+
* Subscribes to a channel and publishes its handler set.
|
|
1136
|
+
*
|
|
1137
|
+
* The set is registered only once the subscribe has succeeded. A map entry published ahead of
|
|
1138
|
+
* the await would survive a rejection, and every later caller reads that entry as proof the
|
|
1139
|
+
* channel is subscribed — registering handlers against a channel Redis is not listening on,
|
|
1140
|
+
* with nothing surfaced.
|
|
1141
|
+
*/
|
|
1142
|
+
async subscribeChannel(fullChannel) {
|
|
1143
|
+
await this._subscriber?.subscribe(fullChannel);
|
|
1144
|
+
const handlers = new Set();
|
|
1145
|
+
this._channelHandlers.set(fullChannel, handlers);
|
|
1146
|
+
if (this._enableLogging) {
|
|
1147
|
+
LogStatus(`Redis pub/sub: subscribed to channel "${fullChannel}"`);
|
|
1148
|
+
}
|
|
1149
|
+
return handlers;
|
|
1150
|
+
}
|
|
1151
|
+
/** Routes an inbound message to the handlers registered for its channel. @internal */
|
|
1152
|
+
dispatchChannelMessage(channel, message) {
|
|
1153
|
+
const handlers = this._channelHandlers.get(channel);
|
|
1154
|
+
if (!handlers) {
|
|
1155
|
+
return;
|
|
1156
|
+
}
|
|
1157
|
+
for (const handler of handlers) {
|
|
1158
|
+
try {
|
|
1159
|
+
handler(message);
|
|
1160
|
+
}
|
|
1161
|
+
catch (err) {
|
|
1162
|
+
if (this._enableLogging) {
|
|
1163
|
+
LogError(`Redis pub/sub handler for "${channel}" threw: ${err.message}`);
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
/** Namespaces a channel with the provider's key prefix. @internal */
|
|
1169
|
+
qualifyChannel(channel) {
|
|
1170
|
+
return `${this._keyPrefix}:${channel}`;
|
|
1171
|
+
}
|
|
799
1172
|
/**
|
|
800
1173
|
* Registers a callback for cache change events from other servers.
|
|
801
1174
|
* The callback fires whenever another server instance modifies a cached entry
|
|
@@ -830,5 +1203,132 @@ export class RedisLocalStorageProvider {
|
|
|
830
1203
|
get IsSubscriberConnected() {
|
|
831
1204
|
return this._subscriberConnected;
|
|
832
1205
|
}
|
|
1206
|
+
/**
|
|
1207
|
+
* Registers a callback for the loss of the Redis connection.
|
|
1208
|
+
*
|
|
1209
|
+
* Fires on a transition only — not on the first connect, and not again while a reconnect is
|
|
1210
|
+
* being retried. {@link IsConnected} reports the current state but not that it changed, so a
|
|
1211
|
+
* consumer wanting to degrade or report health needs this rather than a poll.
|
|
1212
|
+
*
|
|
1213
|
+
* Use this in preference to reading the log: status-level logging is suppressed when
|
|
1214
|
+
* `GetProductionStatus()` is true, so a deployed process says nothing when its cache client
|
|
1215
|
+
* dies.
|
|
1216
|
+
*
|
|
1217
|
+
* @param callback - Invoked with a short human-readable reason for the loss
|
|
1218
|
+
* @returns A function that removes this registration
|
|
1219
|
+
*
|
|
1220
|
+
* @example
|
|
1221
|
+
* ```typescript
|
|
1222
|
+
* const stop = provider.OnConnectionLost(reason => health.markCacheDown(reason));
|
|
1223
|
+
* provider.OnConnectionRestored(() => health.markCacheUp());
|
|
1224
|
+
* ```
|
|
1225
|
+
*/
|
|
1226
|
+
OnConnectionLost(callback) {
|
|
1227
|
+
this._eventEmitter.on('connectionLost', callback);
|
|
1228
|
+
return () => {
|
|
1229
|
+
this._eventEmitter.off('connectionLost', callback);
|
|
1230
|
+
};
|
|
1231
|
+
}
|
|
1232
|
+
/**
|
|
1233
|
+
* Registers a callback for the Redis connection being restored after a loss. Not fired for the
|
|
1234
|
+
* first connection.
|
|
1235
|
+
*
|
|
1236
|
+
* Cache correctness after the gap is handled by the provider itself; see
|
|
1237
|
+
* {@link OnReconciliationRequired} for the signal that local state had to be dropped.
|
|
1238
|
+
*
|
|
1239
|
+
* @param callback - Invoked when the connection comes back
|
|
1240
|
+
* @returns A function that removes this registration
|
|
1241
|
+
*/
|
|
1242
|
+
OnConnectionRestored(callback) {
|
|
1243
|
+
this._eventEmitter.on('connectionRestored', callback);
|
|
1244
|
+
return () => {
|
|
1245
|
+
this._eventEmitter.off('connectionRestored', callback);
|
|
1246
|
+
};
|
|
1247
|
+
}
|
|
1248
|
+
/**
|
|
1249
|
+
* Registers a callback for the provider having concluded, after a connection gap, that local
|
|
1250
|
+
* cache state must be dropped.
|
|
1251
|
+
*
|
|
1252
|
+
* The standard categories are flushed by the provider itself via {@link OnCacheChanged}. Use
|
|
1253
|
+
* this for state those categories do not describe — an in-process engine, a derived index, a
|
|
1254
|
+
* memoized permission set — which would otherwise survive a reconnect while stale.
|
|
1255
|
+
*
|
|
1256
|
+
* Does not fire when nothing was invalidated anywhere during the gap.
|
|
1257
|
+
*
|
|
1258
|
+
* @param callback - Invoked when a flush is required
|
|
1259
|
+
* @returns A function that removes this registration
|
|
1260
|
+
*/
|
|
1261
|
+
OnReconciliationRequired(callback) {
|
|
1262
|
+
this._eventEmitter.on('reconciliationRequired', callback);
|
|
1263
|
+
return () => {
|
|
1264
|
+
this._eventEmitter.off('reconciliationRequired', callback);
|
|
1265
|
+
};
|
|
1266
|
+
}
|
|
1267
|
+
/**
|
|
1268
|
+
* The highest fleet-wide epoch this process has observed. Exposed for diagnostics and for tests
|
|
1269
|
+
* that need to assert what reconciliation decided; consumers should not need it.
|
|
1270
|
+
*/
|
|
1271
|
+
get LastSeenEpoch() {
|
|
1272
|
+
return this._lastSeenEpoch;
|
|
1273
|
+
}
|
|
1274
|
+
/**
|
|
1275
|
+
* Reports a lost connection once per outage.
|
|
1276
|
+
*
|
|
1277
|
+
* Both routes into this are repeatable: `close` fires on every failed reconnection attempt, and an
|
|
1278
|
+
* exhausted retry ceiling arrives separately after one. Consumers get a single notification, and
|
|
1279
|
+
* the next `ready` clears the latch so the following outage reports again.
|
|
1280
|
+
*
|
|
1281
|
+
* @internal
|
|
1282
|
+
*/
|
|
1283
|
+
noteConnectionLost(reason) {
|
|
1284
|
+
if (this._connectionLostEmitted) {
|
|
1285
|
+
return;
|
|
1286
|
+
}
|
|
1287
|
+
this._connectionLostEmitted = true;
|
|
1288
|
+
this.emitConnectionLost(reason);
|
|
1289
|
+
}
|
|
1290
|
+
/**
|
|
1291
|
+
* Raises the public lost-connection event and logs it.
|
|
1292
|
+
*
|
|
1293
|
+
* Uses the error channel, and is not gated behind `enableLogging`: status-level output is
|
|
1294
|
+
* suppressed in production and that flag is routinely turned off, either of which would leave a
|
|
1295
|
+
* dead cache client silent.
|
|
1296
|
+
*
|
|
1297
|
+
* @internal
|
|
1298
|
+
*/
|
|
1299
|
+
emitConnectionLost(reason) {
|
|
1300
|
+
LogError(`[Redis] connection lost (${reason}) — cache reads will miss and writes will no-op until it returns`);
|
|
1301
|
+
this.safeEmit('connectionLost', reason);
|
|
1302
|
+
}
|
|
1303
|
+
/**
|
|
1304
|
+
* Raises the public restored-connection event and logs it, on the error channel for the same
|
|
1305
|
+
* reason as the loss — otherwise the logs show an outage that never ends.
|
|
1306
|
+
*
|
|
1307
|
+
* @internal
|
|
1308
|
+
*/
|
|
1309
|
+
emitConnectionRestored() {
|
|
1310
|
+
LogError('[Redis] connection restored');
|
|
1311
|
+
this.safeEmit('connectionRestored');
|
|
1312
|
+
}
|
|
1313
|
+
/**
|
|
1314
|
+
* Emits to consumer callbacks, containing each listener's errors so that neither the connection
|
|
1315
|
+
* handling that triggered the event nor the other listeners are affected.
|
|
1316
|
+
*
|
|
1317
|
+
* Invokes listeners individually rather than through `EventEmitter.emit`, which calls them
|
|
1318
|
+
* synchronously in turn: one throwing there would stop every listener after it from running at
|
|
1319
|
+
* all.
|
|
1320
|
+
*
|
|
1321
|
+
* @internal
|
|
1322
|
+
*/
|
|
1323
|
+
safeEmit(event, ...args) {
|
|
1324
|
+
for (const listener of this._eventEmitter.rawListeners(event)) {
|
|
1325
|
+
try {
|
|
1326
|
+
listener(...args);
|
|
1327
|
+
}
|
|
1328
|
+
catch (err) {
|
|
1329
|
+
LogError(`[Redis] a ${event} listener threw: ${err.message}`);
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
833
1333
|
}
|
|
834
1334
|
//# sourceMappingURL=RedisLocalStorageProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedisLocalStorageProvider.js","sourceRoot":"","sources":["../src/RedisLocalStorageProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAyB,SAAS,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAElF,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAgGlD;;;GAGG;AACH,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,OAAO,yBAAyB;IAsBlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,YAAY,SAA8B,EAAE;QArD5C;;;;WAIG;QACa,qBAAgB,GAAG,KAAK,CAAC;QAMjC,eAAU,GAAY,KAAK,CAAC;QAI5B,gBAAW,GAAiB,IAAI,CAAC;QAEjC,kBAAa,GAAiB,IAAI,YAAY,EAAE,CAAC;QACjD,yBAAoB,GAAY,KAAK,CAAC;QAoC1C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,SAAS,IAAI,IAAI,CAAC;QAC3C,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC;QACnD,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,aAAa,IAAI,IAAI,CAAC;QACnD,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,YAAY,IAAI,KAAK,CA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"module",
|
|
4
|
-
"version": "6.2.0-edge.
|
|
4
|
+
"version": "6.2.0-edge.3",
|
|
5
5
|
"description": "Redis-backed ILocalStorageProvider for MemberJunction — enables shared, persistent server-side caching via any Redis-compatible service (Azure Managed Redis, AWS ElastiCache, self-hosted, etc.)",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"author": "MemberJunction.com",
|
|
12
12
|
"license": "BUSL-1.1",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@memberjunction/core": "6.2.0-edge.
|
|
15
|
-
"@memberjunction/global": "6.2.0-edge.
|
|
14
|
+
"@memberjunction/core": "6.2.0-edge.3",
|
|
15
|
+
"@memberjunction/global": "6.2.0-edge.3",
|
|
16
16
|
"ioredis": "^5.6.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|