querysub 0.418.0 → 0.419.0
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/package.json
CHANGED
|
@@ -23,6 +23,7 @@ import { getDomain, isPublic } from "../config";
|
|
|
23
23
|
import { getGitRefSync, getGitURLSync } from "../4-deploy/git";
|
|
24
24
|
import type { DeployProgress } from "../4-deploy/deployFunctions";
|
|
25
25
|
import { getRoutingOverride, getRoutingOverridePart } from "../0-path-value-core/PathRouterRouteOverride";
|
|
26
|
+
import { PathRouter } from "../0-path-value-core/PathRouter";
|
|
26
27
|
setImmediate(() => import("../4-querysub/Querysub"));
|
|
27
28
|
|
|
28
29
|
export const functionSchema = rawSchema<{
|
|
@@ -441,7 +442,10 @@ export class PathFunctionRunner {
|
|
|
441
442
|
let { shardRange, secondaryShardRange } = this.config;
|
|
442
443
|
if (!secondaryShardRange) return 0;
|
|
443
444
|
let fraction = getRoutingOverridePart(callPath.CallId)?.route;
|
|
444
|
-
if (fraction === undefined)
|
|
445
|
+
if (fraction === undefined) {
|
|
446
|
+
console.error(`No routing override found for callId, falling back to direct hash`);
|
|
447
|
+
fraction = PathRouter.getSingleKeyRoute(callPath.CallId);
|
|
448
|
+
}
|
|
445
449
|
// It isn't secondary if it is primary
|
|
446
450
|
if (shardRange.startFraction <= fraction && fraction < shardRange.endFraction) return 0;
|
|
447
451
|
if (!(secondaryShardRange.startFraction <= fraction && fraction < secondaryShardRange.endFraction)) return 0;
|