@axinom/mosaic-db-common 0.49.0-rc.7 → 0.49.0-rc.9
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.
|
@@ -1260,6 +1260,14 @@ BEGIN
|
|
|
1260
1260
|
LOOP
|
|
1261
1261
|
BEGIN
|
|
1262
1262
|
EXIT WHEN cardinality(ids) >= max_size;
|
|
1263
|
+
|
|
1264
|
+
-- if the message is locked into the future, then skip it.
|
|
1265
|
+
-- we skip it inside the LOOP with a CONTINUE instead of adding it as a WHERE clause to the SELECT because
|
|
1266
|
+
-- we need the DISTINCT ON (segment) clause to also include such locked messages to guarantee the strict
|
|
1267
|
+
-- execution order of messages belonging to the same segment.
|
|
1268
|
+
IF loop_row.locked_until > NOW() THEN
|
|
1269
|
+
CONTINUE;
|
|
1270
|
+
END IF;
|
|
1263
1271
|
|
|
1264
1272
|
SELECT *
|
|
1265
1273
|
INTO message_row
|
|
@@ -1267,10 +1275,6 @@ BEGIN
|
|
|
1267
1275
|
WHERE id = loop_row.id
|
|
1268
1276
|
FOR NO KEY UPDATE NOWAIT; -- throw/catch error when locked
|
|
1269
1277
|
|
|
1270
|
-
IF message_row.locked_until > NOW() THEN
|
|
1271
|
-
CONTINUE;
|
|
1272
|
-
END IF;
|
|
1273
|
-
|
|
1274
1278
|
ids := array_append(ids, message_row.id);
|
|
1275
1279
|
EXCEPTION
|
|
1276
1280
|
WHEN lock_not_available THEN
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axinom/mosaic-db-common",
|
|
3
|
-
"version": "0.49.0-rc.
|
|
3
|
+
"version": "0.49.0-rc.9",
|
|
4
4
|
"description": "This library encapsulates database-related functionality to develop Mosaic based services.",
|
|
5
5
|
"author": "Axinom",
|
|
6
6
|
"license": "PROPRIETARY",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "d34c0f906f1242b164d1d25b1a3f1547eda53996"
|
|
59
59
|
}
|