prostgles-server 4.2.639 → 4.2.641

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.
Files changed (98) hide show
  1. package/debug/diff-review-build.log +4 -0
  2. package/debug/diff-review-test-server.log +551 -0
  3. package/debug/diff-review-tests-build.log +0 -0
  4. package/debug/nested-aggregate-build.log +4 -0
  5. package/debug/nested-aggregate-test-compile.log +0 -0
  6. package/debug/nested-aggregate-test-server.log +586 -0
  7. package/debug/sort-query-build.log +4 -0
  8. package/debug/sort-query-tests-build.log +0 -0
  9. package/debug/sync-logging-build.log +4 -0
  10. package/debug/sync-logging-main.log +688 -0
  11. package/debug/sync-logging-server-build.log +0 -0
  12. package/debug/sync-race-client-build.log +12 -0
  13. package/debug/sync-race-main-e2e-final.log +659 -0
  14. package/debug/sync-race-main-e2e.log +643 -0
  15. package/debug/sync-race-server-build.log +11 -0
  16. package/debug/sync-race-test-lib-final.log +59 -0
  17. package/debug/sync-race-test-lib.log +59 -0
  18. package/debug/sync-review-build.log +4 -0
  19. package/debug/sync-review-client-build.log +0 -0
  20. package/debug/sync-review-main-final.log +685 -0
  21. package/debug/sync-review-main.log +644 -0
  22. package/debug/sync-review-server-build.log +0 -0
  23. package/debug/sync-review-syncData.js +147 -0
  24. package/debug/sync-review-without-reconcile.log +647 -0
  25. package/dist/Auth/AuthHandler.d.ts +2 -2
  26. package/dist/Auth/AuthHandler.d.ts.map +1 -1
  27. package/dist/Auth/AuthHandler.js.map +1 -1
  28. package/dist/Auth/AuthTypes.d.ts +2 -2
  29. package/dist/Auth/AuthTypes.d.ts.map +1 -1
  30. package/dist/Auth/utils/getClientRequestIPsInfo.d.ts +2 -2
  31. package/dist/Auth/utils/getClientRequestIPsInfo.d.ts.map +1 -1
  32. package/dist/DBEventsManager.d.ts +5 -5
  33. package/dist/DBEventsManager.d.ts.map +1 -1
  34. package/dist/DBEventsManager.js.map +1 -1
  35. package/dist/DboBuilder/DboBuilderTypes.d.ts +1 -1
  36. package/dist/DboBuilder/DboBuilderTypes.d.ts.map +1 -1
  37. package/dist/DboBuilder/QueryBuilder/getJoinQuery.d.ts.map +1 -1
  38. package/dist/DboBuilder/QueryBuilder/getJoinQuery.js +4 -3
  39. package/dist/DboBuilder/QueryBuilder/getJoinQuery.js.map +1 -1
  40. package/dist/DboBuilder/dboBuilderUtils.d.ts +1 -1
  41. package/dist/DboBuilder/dboBuilderUtils.d.ts.map +1 -1
  42. package/dist/DboBuilder/dboBuilderUtils.js +3 -2
  43. package/dist/DboBuilder/dboBuilderUtils.js.map +1 -1
  44. package/dist/DboBuilder/runSql/QueryStreamer.d.ts +2 -2
  45. package/dist/DboBuilder/runSql/QueryStreamer.d.ts.map +1 -1
  46. package/dist/Logging.d.ts +4 -0
  47. package/dist/Logging.d.ts.map +1 -1
  48. package/dist/Prostgles.d.ts +4 -4
  49. package/dist/Prostgles.d.ts.map +1 -1
  50. package/dist/Prostgles.js.map +1 -1
  51. package/dist/ProstglesTypes.d.ts +3 -3
  52. package/dist/ProstglesTypes.d.ts.map +1 -1
  53. package/dist/PubSubManager/PubSubManager.d.ts +8 -7
  54. package/dist/PubSubManager/PubSubManager.d.ts.map +1 -1
  55. package/dist/PubSubManager/PubSubManager.js.map +1 -1
  56. package/dist/PubSubManager/SyncReplication/getSyncUtilFunctions.d.ts +2 -2
  57. package/dist/PubSubManager/SyncReplication/getSyncUtilFunctions.d.ts.map +1 -1
  58. package/dist/PubSubManager/SyncReplication/getSyncUtilFunctions.js +1 -3
  59. package/dist/PubSubManager/SyncReplication/getSyncUtilFunctions.js.map +1 -1
  60. package/dist/PubSubManager/SyncReplication/logSyncError.d.ts +6 -0
  61. package/dist/PubSubManager/SyncReplication/logSyncError.d.ts.map +1 -0
  62. package/dist/PubSubManager/SyncReplication/logSyncError.js +18 -0
  63. package/dist/PubSubManager/SyncReplication/logSyncError.js.map +1 -0
  64. package/dist/PubSubManager/SyncReplication/syncData.d.ts.map +1 -1
  65. package/dist/PubSubManager/SyncReplication/syncData.js +48 -27
  66. package/dist/PubSubManager/SyncReplication/syncData.js.map +1 -1
  67. package/dist/PubSubManager/addSync.d.ts.map +1 -1
  68. package/dist/PubSubManager/addSync.js +3 -3
  69. package/dist/PubSubManager/addSync.js.map +1 -1
  70. package/dist/PubSubManager/addTrigger.d.ts +2 -2
  71. package/dist/PubSubManager/addTrigger.d.ts.map +1 -1
  72. package/dist/PubSubManager/addTrigger.js.map +1 -1
  73. package/dist/WebsocketAPI/onSocketConnected.d.ts +2 -2
  74. package/dist/WebsocketAPI/onSocketConnected.d.ts.map +1 -1
  75. package/dist/WebsocketAPI/onSocketConnected.js.map +1 -1
  76. package/dist/WebsocketAPI/pushSocketSchema.d.ts +2 -2
  77. package/dist/WebsocketAPI/pushSocketSchema.d.ts.map +1 -1
  78. package/dist/WebsocketAPI/pushSocketSchema.js.map +1 -1
  79. package/lib/Auth/AuthHandler.ts +2 -2
  80. package/lib/Auth/AuthTypes.ts +2 -2
  81. package/lib/Auth/utils/getClientRequestIPsInfo.ts +2 -2
  82. package/lib/DBEventsManager.ts +5 -5
  83. package/lib/DboBuilder/DboBuilderTypes.ts +1 -1
  84. package/lib/DboBuilder/QueryBuilder/getJoinQuery.ts +5 -4
  85. package/lib/DboBuilder/dboBuilderUtils.ts +7 -2
  86. package/lib/DboBuilder/runSql/QueryStreamer.ts +2 -2
  87. package/lib/Logging.ts +5 -0
  88. package/lib/Prostgles.ts +2 -2
  89. package/lib/ProstglesTypes.ts +3 -3
  90. package/lib/PubSubManager/PubSubManager.ts +7 -6
  91. package/lib/PubSubManager/SyncReplication/getSyncUtilFunctions.ts +3 -8
  92. package/lib/PubSubManager/SyncReplication/logSyncError.ts +22 -0
  93. package/lib/PubSubManager/SyncReplication/syncData.ts +54 -30
  94. package/lib/PubSubManager/addSync.ts +3 -4
  95. package/lib/PubSubManager/addTrigger.ts +2 -2
  96. package/lib/WebsocketAPI/onSocketConnected.ts +2 -2
  97. package/lib/WebsocketAPI/pushSocketSchema.ts +2 -2
  98. package/package.json +1 -1
@@ -0,0 +1,647 @@
1
+
2
+ > server_tests@1.0.0 test-client
3
+ > TEST_TYPE=client node --trace-uncaught --test dist/server/index.js
4
+
5
+ Prostgles: SQL file executed successfuly /home/s/prostgles-server-js/tests/server/init.sql
6
+ Running queries: /* prostgles internal query that should be excluded from schema watch */
7
+
8
+ DROP TABLE IF EXISTS "lookup_col1" CASCADE;
9
+ CREATE TABLE IF NOT EXISTS "lookup_col1" (
10
+ id TEXT PRIMARY KEY
11
+ , "description" TEXT
12
+ );
13
+ INSERT INTO "lookup_col1" ("id", "description") VALUES ('a','desc') ON CONFLICT DO NOTHING;
14
+ INSERT INTO "lookup_col1" ("id", "description") VALUES ('b',null) ON CONFLICT DO NOTHING;
15
+ Running queries: /* prostgles internal query that should be excluded from schema watch */
16
+
17
+ CREATE TABLE "files" (
18
+ "id" UUID PRIMARY KEY DEFAULT gen_random_uuid() ,
19
+ "storage_key" UUID UNIQUE ,
20
+ "extension" TEXT NOT NULL DEFAULT '' ,
21
+ "content_type" TEXT NOT NULL DEFAULT '' ,
22
+ "content_length" BIGINT NOT NULL DEFAULT 0 ,
23
+ "etag" TEXT NOT NULL DEFAULT '' ,
24
+ "original_name" TEXT NOT NULL ,
25
+ "original_last_modified" TIMESTAMPTZ ,
26
+ "description" TEXT ,
27
+ "url" TEXT NOT NULL DEFAULT '' ,
28
+ "cloud_url" TEXT ,
29
+ "signed_url" TEXT ,
30
+ "signed_url_expires" BIGINT ,
31
+ "added" TIMESTAMP NOT NULL DEFAULT NOW() ,
32
+ "updated" TIMESTAMP NOT NULL DEFAULT NOW() ,
33
+ "deleted" TIMESTAMPTZ ,
34
+ "deleted_from_storage" TIMESTAMPTZ ,
35
+ "data" BYTEA NOT NULL CHECK (data = decode('01', 'hex')) ,
36
+ "version" INTEGER NOT NULL DEFAULT 1 ,
37
+ "metadata" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"type":{"description":{"type":"string"}}}'::TEXT, "metadata", '{"table":"files","column":"metadata"}' ))
38
+ );
39
+ CREATE TABLE "files_versions" (
40
+ "id" UUID PRIMARY KEY DEFAULT gen_random_uuid() ,
41
+ "storage_key" UUID NOT NULL ,
42
+ "extension" TEXT NOT NULL DEFAULT '' ,
43
+ "content_type" TEXT NOT NULL DEFAULT '' ,
44
+ "content_length" BIGINT NOT NULL DEFAULT 0 ,
45
+ "etag" TEXT NOT NULL DEFAULT '' ,
46
+ "original_name" TEXT NOT NULL ,
47
+ "original_last_modified" TIMESTAMPTZ ,
48
+ "description" TEXT ,
49
+ "url" TEXT NOT NULL DEFAULT '' ,
50
+ "cloud_url" TEXT ,
51
+ "signed_url" TEXT ,
52
+ "signed_url_expires" BIGINT ,
53
+ "added" TIMESTAMP NOT NULL DEFAULT NOW() ,
54
+ "updated" TIMESTAMP NOT NULL DEFAULT NOW() ,
55
+ "deleted" TIMESTAMPTZ ,
56
+ "deleted_from_storage" TIMESTAMPTZ ,
57
+ "file_id" UUID NOT NULL ,
58
+ "version" INTEGER NOT NULL ,
59
+ "created" TIMESTAMP NOT NULL DEFAULT NOW() ,
60
+ "metadata" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"type":{"description":{"type":"string"}}}'::TEXT, "metadata", '{"table":"files_versions","column":"metadata"}' ))
61
+ );
62
+ ALTER TABLE "files_versions" ADD CONSTRAINT "prostgles_file_version_e24fec525e76b3433749621f589d35d9" FOREIGN KEY (file_id) REFERENCES "files"(id) ON DELETE CASCADE;
63
+ CREATE UNIQUE INDEX "prostgles_file_version_9692aae50022f45f1098646939b287b1_key" ON "files_versions" (file_id, version);
64
+ COMMENT ON INDEX "prostgles_file_version_9692aae50022f45f1098646939b287b1_key" IS 'd4af15d064cae99adac0c1194199a9e3';
65
+ CREATE TABLE "users_public_info" (
66
+ "id" SERIAL PRIMARY KEY ,
67
+ "name" TEXT ,
68
+ "avatar" UUID REFERENCES files ON DELETE CASCADE ,
69
+ "sid" TEXT
70
+ );
71
+ DROP TABLE IF EXISTS "users";
72
+ CREATE TABLE "users" (
73
+ "id" SERIAL PRIMARY KEY ,
74
+ "email" TEXT NOT NULL ,
75
+ "status" TEXT NOT NULL CHECK("status" = 'active' OR "status" = 'disabled' OR "status" = 'pending'),
76
+ "type" TEXT NOT NULL ,
77
+ "preferences" JSONB NOT NULL CHECK(prostgles.validate_jsonb_schema('{"type":{"showIntro":{"type":"boolean","optional":true},"theme":{"enum":["light","dark","auto"],"optional":true},"others":{"type":"any[]"}}}'::TEXT, "preferences", '{"table":"users","column":"preferences"}' ))
78
+ );
79
+ DROP TABLE IF EXISTS "tjson";
80
+ CREATE TABLE "tjson" (
81
+ "json" JSONB NOT NULL CHECK(prostgles.validate_jsonb_schema('{"type":{"a":{"type":"boolean"},"arr":{"enum":["1","2","3"]},"arr1":{"enum":[1,2,3]},"arr2":{"type":"integer[]"},"arrStr":{"type":"string[]","optional":true,"nullable":true},"o":{"optional":true,"nullable":true,"oneOfType":[{"o1":"integer"},{"o2":"boolean"}]}}}'::TEXT, "json", '{"table":"tjson","column":"json"}' )),
82
+ "colOneOf" TEXT NOT NULL CHECK("colOneOf" = 'a' OR "colOneOf" = 'b' OR "colOneOf" = 'c'),
83
+ "status" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"oneOfType":[{"ok":{"type":"string"}},{"err":{"type":"string"}},{"loading":{"type":{"loaded":{"type":"number"},"total":{"type":"number"}}}}]}'::TEXT, "status", '{"table":"tjson","column":"status"}' )),
84
+ "jsonOneOf" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"oneOfType":[{"command":{"enum":["a"]}},{"command":{"enum":["b"]},"option":{"type":"integer[]"}}]}'::TEXT, "jsonOneOf", '{"table":"tjson","column":"jsonOneOf"}' )),
85
+ "table_config" JSONB CHECK(prostgles.validate_jsonb_schema('{"nullable":true,"type":{"referencedTables":{"optional":true,"arrayOfType":{"name":"string","minFiles":"number"}},"recType":{"nullable":true,"optional":true,"record":{"keysEnum":["a","b"],"values":{"type":{"bools":"boolean[]"}}}}}}'::TEXT, "table_config", '{"table":"tjson","column":"table_config"}' ))
86
+ );
87
+ Running queries: /* prostgles internal query that should be excluded from schema watch */
88
+
89
+ ALTER TABLE "uuid_text" ADD FOREIGN KEY (col1) REFERENCES lookup_col1(id);
90
+ ALTER TABLE "uuid_text" ADD FOREIGN KEY (col2) REFERENCES lookup_col1(id);
91
+ ALTER TABLE "uuid_text" ADD FOREIGN KEY (col3) REFERENCES lookup_col1(id);
92
+ DROP TABLE IF EXISTS "api_table";
93
+ CREATE TABLE "api_table" (
94
+ "id" SERIAL PRIMARY KEY
95
+ );
96
+ Prostgles: Initiated file manager. Max allowed file size: 1MB (maxHttpBufferSize = 1e6). To increase this set maxHttpBufferSize in socket.io server init options
97
+ Prostgles: Created typescript schema definition file:
98
+ DBGeneratedSchema.ts
99
+ (server): prostgles onReady
100
+ (server): Waiting for client...
101
+ (client) t+ 0ms Started client...
102
+ onSocketConnect 9i1ksJc1XkYRoaaDAAAA
103
+ (server): Client connected -> console does not work. use log function. socket.id: 9i1ksJc1XkYRoaaDAAAA
104
+ (client) t+ 38ms Client connect.
105
+ (client) t+ 171ms TEST_NAME: main Started
106
+ Client log (client) t+ 184ms Starting isomorphic queries
107
+ ▶ Isomorphic queries
108
+ ✔ Deleting stale data (20.612804ms)
109
+ {
110
+ message: 'malformed array literal: "a"',
111
+ length: 149,
112
+ name: 'error',
113
+ severity: 'ERROR',
114
+ code: '22P02',
115
+ detail: 'Array value must start with "{" or dimension information.',
116
+ position: '325',
117
+ file: 'arrayfuncs.c',
118
+ line: '262',
119
+ routine: 'array_in',
120
+ query: '-- prostgles query id: 8d5ff50e-476e-42db-b13d-eea854d63ada\n' +
121
+ 'SET LOCAL "prostgles.user" \n' +
122
+ `TO '{"id":"1","type":"public"}';\n` +
123
+ 'SELECT \n' +
124
+ ' "prostgles_root_table_alias"."id" AS "id", \n' +
125
+ ' "prostgles_root_table_alias"."h" AS "h", \n' +
126
+ ' "prostgles_root_table_alias"."name" AS "name" \n' +
127
+ ' FROM ( \n' +
128
+ ' SELECT * \n' +
129
+ ' FROM items \n' +
130
+ ` WHERE "h" = 'a' \n` +
131
+ ' ) prostgles_root_table_alias \n' +
132
+ ' LIMIT 0',
133
+ code_info: 'invalid_text_representation'
134
+ }
135
+ {
136
+ message: 'malformed array literal: "a"',
137
+ length: 149,
138
+ name: 'error',
139
+ severity: 'ERROR',
140
+ code: '22P02',
141
+ detail: 'Array value must start with "{" or dimension information.',
142
+ position: '325',
143
+ file: 'arrayfuncs.c',
144
+ line: '262',
145
+ routine: 'array_in',
146
+ query: '-- prostgles query id: 27020364-acd0-4e3d-b038-d0db964e4d56\n' +
147
+ 'SET LOCAL "prostgles.user" \n' +
148
+ `TO '{"id":"1","type":"public"}';\n` +
149
+ 'SELECT \n' +
150
+ ' "prostgles_root_table_alias"."id" AS "id", \n' +
151
+ ' "prostgles_root_table_alias"."h" AS "h", \n' +
152
+ ' "prostgles_root_table_alias"."name" AS "name" \n' +
153
+ ' FROM ( \n' +
154
+ ' SELECT * \n' +
155
+ ' FROM items \n' +
156
+ ` WHERE "h" = 'a' \n` +
157
+ ' ) prostgles_root_table_alias \n' +
158
+ ' LIMIT 0',
159
+ code_info: 'invalid_text_representation'
160
+ }
161
+ ✔ Error structure malformed array literal (62.914227ms)
162
+ ✔ Table info (2.180027ms)
163
+ ✔ Prepare data (71.650437ms)
164
+ ✔ Test bytea (12.433656ms)
165
+ ✔ abortSignal terminates a running query (5552.173464ms)
166
+ ✔ Client queries are aborted no more than after n seconds (14010.902681ms)
167
+ ✔ Subscription tracked_columns get merged correctly (0.477792ms)
168
+ Created PubSubManager
169
+ ✔ Aggregate subscription tracks FILTER and ORDER BY dependencies (1033.400901ms)
170
+ ✔ CASE select and subscription dependencies (658.406983ms)
171
+ ✔ Subscription tracks non-selected ORDER BY columns (656.892506ms)
172
+ ✔ merge json (12.085967ms)
173
+ ✔ json array converted to pg array filter bug (3.478036ms)
174
+ ✔ onConflict do update (12.906111ms)
175
+ ✔ Local file upload (56.627426ms)
176
+ ✔ Local file delete (38.189114ms)
177
+ ✔ Local file update (57.222807ms)
178
+ ✔ getColumns definition (3.61528ms)
179
+ ✔ returnType (1.412867ms)
180
+ ✔ Table config triggers (12.933856ms)
181
+ ✔ $unnest_words (2.622095ms)
182
+ ✔ Group by/Distinct (4.612055ms)
183
+ ✔ sql returntype default-with-rollback (39.919598ms)
184
+ ✔ returnType: value (1.385327ms)
185
+ ✔ PostgreSQL array element (4.443114ms)
186
+ ✔ FTS filtering (4.473303ms)
187
+ ✔ $term_highlight (3.292174ms)
188
+ ✔ funcFilters: $term_highlight (1.939496ms)
189
+ Client log (client) t+ 22546ms [{"name":null}]
190
+ Client log (client) t+ 22550ms [{"name":"zz3zz1"}]
191
+ Pushing 1 rows to socket x9
192
+ Client log (client) t+ 23204ms []
193
+ ✔ subscribe skipChangedColumnsCheck false by default = sub should not fire if selected data did not change (866.950199ms)
194
+ Pushing 0 rows to socket
195
+ Client log (client) t+ 25957ms [{"name":null}]
196
+ Client log (client) t+ 25962ms [{"name":"zz3zz1"}]
197
+ Client log (client) t+ 26179ms [{"name":"zz3zz1"}]
198
+ Client log (client) t+ 26395ms [{"name":"zz3zz1"}]
199
+ Pushing 1 rows to socket x4
200
+ Client log (client) t+ 26606ms []
201
+ ✔ subscribe skipChangedColumnsCheck true (3401.523119ms)
202
+ Pushing 0 rows to socket
203
+ Pushing 1 rows to socket x4
204
+ Client log unsubscribe start - various
205
+ Client log unsubscribe end - various
206
+ ✔ subscribe (60.94338ms)
207
+ Pushing 0 rows to socket
208
+ Pushing 1 rows to socket
209
+ ✔ subscribe to schema.table (20.670247ms)
210
+ Pushing 2 rows to socket
211
+ ✔ parallel subscriptions (2012.115777ms)
212
+ Client log (client) t+ 33137ms updateAll done in 1733
213
+ Client log (client) t+ 34760ms updateAll done in 1619
214
+ Pushing 0 rows to socket
215
+ Pushing 3 rows to socket
216
+ Client log (client) t+ 35306ms Locks: [{"pid":221,"blocking_pids":[218],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1001'\n WHERE id = 1001;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1003'\n WHERE id = 1003;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
217
+ Client log (client) t+ 35307ms Locks: [{"pid":215,"blocking_pids":[221,222],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1007'\n WHERE id = 1007;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1008'\n WHERE id = 1008;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
218
+ Client log (client) t+ 35363ms Locks: [{"pid":220,"blocking_pids":[215],"wait_event":null,"wait_event_type":null,"query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1044'\n WHERE id = 1044;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1045'\n WHERE id = 1045;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
219
+ Client log (client) t+ 35468ms Locks: [{"pid":201,"blocking_pids":[217],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1119'\n WHERE id = 1119;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":null}]
220
+ Client log (client) t+ 35796ms Locks: [{"pid":216,"blocking_pids":[219],"wait_event":"PgSleep","wait_event_type":"Timeout","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1350'\n WHERE id = 1350;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1351'\n WHERE id = 1351;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
221
+ Client log (client) t+ 35866ms Locks: [{"pid":220,"blocking_pids":[],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1398'\n WHERE id = 1398;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":null}]
222
+ Client log (client) t+ 35933ms Locks: [{"pid":217,"blocking_pids":[220],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1446'\n WHERE id = 1446;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1445'\n WHERE id = 1445;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
223
+ Client log (client) t+ 35972ms Locks: [{"pid":219,"blocking_pids":[221],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1474'\n WHERE id = 1474;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1473'\n WHERE id = 1473;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
224
+ Client log (client) t+ 36023ms Locks: [{"pid":218,"blocking_pids":[201,213],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1512'\n WHERE id = 1512;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1509'\n WHERE id = 1509;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "},{"pid":213,"blocking_pids":[201],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1511'\n WHERE id = 1511;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1509'\n WHERE id = 1509;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
225
+ Client log (client) t+ 36062ms Locks: [{"pid":201,"blocking_pids":[215],"wait_event":"PgSleep","wait_event_type":"Timeout","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1540'\n WHERE id = 1540;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1539'\n WHERE id = 1539;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
226
+ Client log (client) t+ 36558ms Locks: [{"pid":215,"blocking_pids":[213],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1888'\n WHERE id = 1888;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1890'\n WHERE id = 1890;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
227
+ Client log (client) t+ 36590ms Locks: [{"pid":215,"blocking_pids":[219],"wait_event":"object","wait_event_type":"Lock","query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1909'\n WHERE id = 1909;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n ","blocking_query":"\n BEGIN;\n UPDATE various\n SET name = 'slowtx1907'\n WHERE id = 1907;\n SELECT pg_sleep(0.01);\n COMMIT;\n\n "}]
228
+ Pushing 996 rows to socket
229
+ Client log (client) t+ 36715ms updateAll done in 1945
230
+ Pushing 1000 rows to socket x2
231
+ ✔ subscriptions do not serialize transactions (9825.233481ms)
232
+ Pushing 3 rows to socket
233
+ Pushing 1 rows to socket
234
+ throttling sub for 1700 ms
235
+ throttling finished. pushSubData...
236
+ Pushing 1 rows to socket
237
+ throttling sub for 1700 ms
238
+ ✔ subscribeOne with throttle (1741.245413ms)
239
+ throttling sub for 1700 ms
240
+ throttling finished. pushSubData...
241
+ ✔ subscribeOne with throttle skipFirst: true (1704.079279ms)
242
+ Pushing 1 rows to socket
243
+ throttling finished. pushSubData...
244
+ Pushing 1 rows to socket
245
+ ✔ subscribeOne without skipFirst (1036.429451ms)
246
+ Pushing 0 rows to socket
247
+ Pushing 1 rows to socket
248
+ ✔ subscribeOne with skipFirst: true (1527.374719ms)
249
+ Pushing 0 rows to socket x2
250
+ ✔ subscribeOne actions: { insert: true } (1542.084621ms)
251
+ Pushing 1 rows to socket
252
+ ✔ subscribeOne actions: { insert: false } (1546.178051ms)
253
+ ✔ JSON filtering (4.927583ms)
254
+ ✔ Complex filtering (4.100502ms)
255
+ ✔ template_string function (6.170172ms)
256
+ ✔ Between filtering (4.077793ms)
257
+ ✔ In filtering (3.706096ms)
258
+ ✔ Order by (4.58102ms)
259
+ ✔ Order by aliased func (2.916573ms)
260
+ ✔ Filter by aliased func (2.47308ms)
261
+ ✔ Count with Filter by aliased func (3.394588ms)
262
+ ✔ Count with Aggregate and Filter by aliased func (3.301553ms)
263
+ ✔ Count with complex filter (2.263265ms)
264
+ ✔ Order by aggregation (2.643617ms)
265
+ ✔ Aggregate FILTER and ORDER BY (2.555795ms)
266
+ ✔ Column alias func (2.101983ms)
267
+ ✔ Order by colliding alias name (2.094005ms)
268
+ ✔ Update batch example (15.88363ms)
269
+ Client log TODO: socket.io stringifies dates
270
+ ✔ Function example (16.8962ms)
271
+ ✔ JSONB filtering (6.243214ms)
272
+ ✔ Postgis examples (18.082129ms)
273
+ ✔ jsonbSchema validation (11.538641ms)
274
+ ✔ find and findOne (2.782785ms)
275
+ ✔ Result size (2.795794ms)
276
+ ✔ Basic exists (7.725157ms)
277
+ ✔ Basic fts with shorthand notation (3.419068ms)
278
+ ✔ Exists with shortest path wildcard filter example (4.385738ms)
279
+ ✔ Exists with exact path filter example (1.652839ms)
280
+ ✔ Not Exists with exact path filter example (4.620261ms)
281
+ ✔ Upsert example (11.856222ms)
282
+ ✔ Joins example (2.159933ms)
283
+ ✔ Joins repeating table example (2.725647ms)
284
+ ✔ Join aggregate functions example (7.509724ms)
285
+ ✔ $rowhash example (7.04599ms)
286
+ ✔ Reference column nested insert (15.310828ms)
287
+ ✔ Join escaped table names with quotes (21.173221ms)
288
+ Pushing 0 rows to socket x2
289
+ Client log (client) t+ 48048ms {
290
+ "item": {
291
+ "\"id0\"": 1,
292
+ "\"quoted1_id\"": 1,
293
+ "\"text_col0\"": "0"
294
+ },
295
+ "runs": 0
296
+ }
297
+ Client log (client) t+ 48059ms {
298
+ "item": {
299
+ "\"id0\"": 1,
300
+ "\"quoted1_id\"": 1,
301
+ "\"text_col0\"": "1"
302
+ },
303
+ "runs": 1
304
+ }
305
+ Client log unsubscribe start - """quoted0"""
306
+ Client log unsubscribe end - """quoted0"""
307
+ ✔ subscribe to escaped table name (25.603334ms)
308
+ Pushing 1 rows to socket x2
309
+ ✔ subscribe using a filter bigger than block_size (19.064811ms)
310
+ ✔ Reverse join with agg (21.982858ms)
311
+ Pushing 0 rows to socket
312
+ Client log {"_rows":[{"id":1,"t1":null,"tr2":[{"id":1,"tr1_id":1,"t1":"a","t2":"b"}],"tr3":[]},{"id":2,"t1":null,"tr2":[{"id":2,"tr1_id":2,"t1":"a","t2":"b"}],"tr3":[]}],"runs":1}
313
+ Client log {"_rows":[{"id":1,"t1":null,"tr2":[{"id":1,"tr1_id":1,"t1":"a","t2":"b"},{"id":3,"tr1_id":1,"t1":"a","t2":"b"}],"tr3":[]},{"id":2,"t1":null,"tr2":[{"id":2,"tr1_id":2,"t1":"a","t2":"b"}],"tr3":[]}],"runs":2}
314
+ ✔ Related table subscribe (9054.438916ms)
315
+ Pushing 2 rows to socket x2
316
+ ✔ Aggregate FILTER registers joined dependency triggers (647.476796ms)
317
+ ✔ Nested sort by computed col (3.590342ms)
318
+ ✔ Nested function on different than source column getNewQuery name bug fix (1.252633ms)
319
+ ✔ Reference column deep nested insert (12.313242ms)
320
+ ✔ Multi reference column nested insert (16.724311ms)
321
+ ✔ Join path with order by nested (11.784801ms)
322
+ ✔ Self join (21.158024ms)
323
+ ✔ One to many multi join duplicate row bug fix (18.435296ms)
324
+ Client log (client) t+ 57898ms various id=99 count 1
325
+ Pushing 1 rows to socket x3
326
+ Client log (client) t+ 57903ms various id=99 count
327
+ Client log ok
328
+ Error within running subscription
329
+ _psqlWS_..various.{"id":99}.{"select":{"name":1}}.m.sub {
330
+ message: 'column prostgles_root_table_alias.name does not exist',
331
+ length: 130,
332
+ name: 'error',
333
+ severity: 'ERROR',
334
+ code: '42703',
335
+ position: '133',
336
+ file: 'parse_relation.c',
337
+ line: '3716',
338
+ routine: 'errorMissingColumn',
339
+ query: '-- prostgles query id: f0c16560-a8e6-4fb5-883f-1600a43e739d\n' +
340
+ 'SET LOCAL "prostgles.user" \n' +
341
+ `TO '{"id":"1","type":"public"}';\n` +
342
+ 'SELECT \n' +
343
+ ' "prostgles_root_table_alias"."name" AS "name" \n' +
344
+ ' FROM ( \n' +
345
+ ' SELECT * \n' +
346
+ ' FROM various \n' +
347
+ ' WHERE "id" = 99 \n' +
348
+ ' ) prostgles_root_table_alias \n' +
349
+ ' LIMIT 1000',
350
+ code_info: 'undefined_column'
351
+ }
352
+ Client log (client) t+ 59929ms various id=99 count
353
+ Client log (client) t+ 59929ms Error in subscription callback: {"message":"column prostgles_root_table_alias.name does not exist","length":130,"name":"error","severity":"ERROR","code":"42703","position":"133","file":"parse_relation.c","line":"3716","routine":"errorMissingColumn","query":"-- prostgles query id: f0c16560-a8e6-4fb5-883f-1600a43e739d\nSET LOCAL \"prostgles.user\" \nTO '{\"id\":\"1\",\"type\":\"public\"}';\nSELECT \n \"prostgles_root_table_alias\".\"name\" AS \"name\" \n FROM ( \n SELECT * \n FROM various \n WHERE \"id\" = 99 \n ) prostgles_root_table_alias \n LIMIT 1000","code_info":"undefined_column"}
354
+ Client log ok
355
+ ✔ subscribe triggers with stale schema should fail gracefully and never block other queries (6559.166415ms)
356
+ ✔ Isomorphic queries (64263.560689ms)
357
+ ✔ Having clause (3.983117ms)
358
+ ✔ Having clause with complex filter (2.997024ms)
359
+ Client log (client) t+ 64470ms auth.user: {"sid":"main","uid":"1","id":"1","type":"public"}
360
+ ✔ Nested join having clause (4.444924ms)
361
+ ▶ isomorphic typed queries
362
+ ✔ isLookupTable DB Types from colConf (0.234617ms)
363
+ ✔ isLookupTable DB Types from reference column actual definition (0.149787ms)
364
+ ✔ isLookupTable pkey column itself is typed (0.138646ms)
365
+ ✔ isomorphic typed queries (0.735297ms)
366
+ ▶ Client only queries
367
+ ✔ modifyClientSchema adds custom table and column metadata (4.817946ms)
368
+ ✔ SQL Stream more than 1k records (27.008949ms)
369
+ ✔ SQL Stream persistedConnection with streamLimit works for subsequent queries (13.654222ms)
370
+ ✔ SQL Stream ensure the connection is never released (same pg_backend_pid is the same for subsequent) when using persistConnectionId (13.412102ms)
371
+ ✔ SQL Stream stop kills the query (1028.036376ms)
372
+ ✔ SQL Stream limit works (28.915767ms)
373
+ ✔ SQL Stream stop with terminate kills the query (expect flakiness) (135.214638ms)
374
+ ✔ SQL Stream (15.767492ms)
375
+ ✔ SQL Stream parallel execution + parameters (13.24719ms)
376
+ ✔ SQL Stream query error structure matches default sql run error (12.753486ms)
377
+ ✔ SQL Stream streamLimit (12.994994ms)
378
+ ✔ SQL Stream table fields are the same as on default request (20.761031ms)
379
+ ✔ SQL Stream works for multiple statements (12.891429ms)
380
+ Client log (client) t+ 65828ms Checking public data
381
+ ✔ Check tableSchema (17.348645ms)
382
+ ✔ Security rules example (43.939525ms)
383
+ Client log (client) t+ 65890ms Started testRealtime
384
+ Client log (client) t+ 65929ms 1790258615284: sub stats: x10 -> 0 x20 ->0
385
+ Client log (client) t+ 65939ms 1790258615294: sync stats: x10 -> 0 x20 -> 0
386
+ Client log (client) t+ 65940ms 1790258615295: sync: p.$update({ x: 10 }); (id: 0)
387
+ Client log (client) t+ 65940ms 1790258615295: sync: p.$update({ x: 10 }); (id: 1)
388
+ Client log (client) t+ 65940ms 1790258615295: sync: p.$update({ x: 10 }); (id: 2)
389
+ Client log (client) t+ 65940ms 1790258615295: sync: p.$update({ x: 10 }); (id: 3)
390
+ Client log (client) t+ 65940ms 1790258615295: sync: p.$update({ x: 10 }); (id: 4)
391
+ Client log (client) t+ 65940ms 1790258615295: sync: p.$update({ x: 10 }); (id: 5)
392
+ Client log (client) t+ 65940ms 1790258615295: sync: p.$update({ x: 10 }); (id: 6)
393
+ Client log (client) t+ 65940ms 1790258615295: sync: p.$update({ x: 10 }); (id: 7)
394
+ Client log (client) t+ 65940ms 1790258615295: sync: p.$update({ x: 10 }); (id: 8)
395
+ Client log (client) t+ 65940ms 1790258615295: sync: p.$update({ x: 10 }); (id: 9)
396
+ Client log (client) t+ 65940ms 1790258615295: sync: p.$update({ x: 10 }); (id: 10)
397
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 11)
398
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 12)
399
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 13)
400
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 14)
401
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 15)
402
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 16)
403
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 17)
404
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 18)
405
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 19)
406
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 20)
407
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 21)
408
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 22)
409
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 23)
410
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 24)
411
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 25)
412
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 26)
413
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 27)
414
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 28)
415
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 29)
416
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 30)
417
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 31)
418
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 32)
419
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 33)
420
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 34)
421
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 35)
422
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 36)
423
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 37)
424
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 38)
425
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 39)
426
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 40)
427
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 41)
428
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 42)
429
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 43)
430
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 44)
431
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 45)
432
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 46)
433
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 47)
434
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 48)
435
+ Client log (client) t+ 65941ms 1790258615296: sync: p.$update({ x: 10 }); (id: 49)
436
+ Pushing 0 rows to socket x3
437
+ upsertData (from client): inserted( 0 ) updated( 50 ) total( 50 )
438
+ last insert undefined
439
+ last update {"id":49,"x":10,"y":49,"flight_number":"FN49","last_updated":1790258615296}
440
+ Client log (client) t+ 66019ms 1790258615374: sub stats: x10 -> 50 x20 ->0
441
+ Pushing 50 rows to socket
442
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
443
+ last insert undefined
444
+ last update undefined
445
+ server.syncBatch planes: inserted( 0 ) updated( 50 ) deleted( 0 ) pushed to client( 50 ) total( 100 ) undefined
446
+ Client log (client) t+ 66029ms 1790258615384: sync stats: x10 -> 50 x20 -> 0
447
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 50)
448
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 51)
449
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 52)
450
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 53)
451
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 54)
452
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 55)
453
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 56)
454
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 57)
455
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 58)
456
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 59)
457
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 60)
458
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 61)
459
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 62)
460
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 63)
461
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 64)
462
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 65)
463
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 66)
464
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 67)
465
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 68)
466
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 69)
467
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 70)
468
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 71)
469
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 72)
470
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 73)
471
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 74)
472
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 75)
473
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 76)
474
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 77)
475
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 78)
476
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 79)
477
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 80)
478
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 81)
479
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 82)
480
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 83)
481
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 84)
482
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 85)
483
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 86)
484
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 87)
485
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 88)
486
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 89)
487
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 90)
488
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 91)
489
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 92)
490
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 93)
491
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 94)
492
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 95)
493
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 96)
494
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 97)
495
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 98)
496
+ Client log (client) t+ 66029ms 1790258615384: sync: p.$update({ x: 10 }); (id: 99)
497
+ Client log (client) t+ 66034ms 1790258615389: sync stats: x10 -> 100 x20 -> 0
498
+ upsertData (from WAL): inserted( 0 ) updated( 0 ) total( 1 )
499
+ last insert undefined
500
+ last update undefined
501
+ upsertData (from WAL): inserted( 0 ) updated( 1 ) total( 50 )
502
+ last insert undefined
503
+ last update {"id":50,"x":10,"last_updated":1790258615384}
504
+ Client log (client) t+ 66159ms 1790258615514: sub stats: x10 -> 51 x20 ->0
505
+ Pushing 51 rows to socket
506
+ upsertData (from WAL): inserted( 0 ) updated( 49 ) total( 49 )
507
+ last insert undefined
508
+ last update {"id":99,"x":10,"last_updated":1790258615384}
509
+ Client log (client) t+ 66305ms 1790258615660: sub stats: x10 -> 100 x20 ->0
510
+ Client log (client) t+ 68306ms 1790258617661: sub: db.planes.update({}, { x: 20, last_updated });
511
+ Client log (client) t+ 68326ms 1790258617676: sub: Updated to x20 100
512
+ Pushing 100 rows to socket
513
+ Client log (client) t+ 68342ms 1790258617697: sync stats: x10 -> 50 x20 -> 50
514
+ Client log (client) t+ 68350ms 1790258617705: sync stats: x10 -> 0 x20 -> 100
515
+ ✔ Realtime (2478.334207ms)
516
+ Client log (client) t+ 68350ms 1790258617705: sync end: Finished replication test. Inserting 100 rows then updating two times took: 460ms
517
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
518
+ last insert undefined
519
+ last update undefined x2
520
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 100 ) total( 100 ) undefined
521
+ Client log (client) t+ 68353ms sync handlesOnData true 100
522
+ ✔ sync handlesOnData true -> false no data bug (2001.999095ms)
523
+ ﹣ Security rules example (0.29368ms) # SKIP
524
+ ✔ Client only queries (5882.870759ms)
525
+ ▶ React hooks
526
+ ✔ useFind (531.478648ms)
527
+ {
528
+ message: 'items4.named is invalid/disallowed for filtering. Allowed columns: added, "id", "public", "name"'
529
+ }
530
+ ✔ useSubscribe (522.568405ms)
531
+ ✔ useFindOne (512.392851ms)
532
+ Pushing 1 rows to socket
533
+ {
534
+ message: 'items4.named is invalid/disallowed for filtering. Allowed columns: added, "id", "public", "name"'
535
+ }
536
+ ✔ useSubscribeOne (518.298504ms)
537
+ ✔ useCount (514.972025ms)
538
+ ✔ useSize (514.775863ms)
539
+ ✔ useCount planes (256.863196ms)
540
+ Pushing 2 rows to socket
541
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
542
+ last insert undefined
543
+ last update undefined
544
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
545
+ last insert undefined
546
+ last update undefined
547
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
548
+ Client log (client) t+ 74052ms 1790258623407: sync stats: x10 -> 0 x20 -> 99
549
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 50 )
550
+ last insert undefined
551
+ last update undefined
552
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 2 ) total( 100 ) undefined
553
+ ✔ useSync (564.625241ms)
554
+ Client log (client) t+ 74331ms 1790258623686: sync stats: x10 -> 0 x20 -> 100
555
+ Client log (client) t+ 74331ms 1790258623686: sync end: Finished replication test. Inserting 100 rows then updating two times took: 6441ms
556
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
557
+ last insert undefined
558
+ last update undefined x2
559
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
560
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
561
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
562
+ last insert undefined
563
+ last update undefined x2
564
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
565
+ Client log (client) t+ 74623ms 1790258623978: sync stats: x10 -> 0 x20 -> 99
566
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
567
+ ✔ useSync updates invalidate useMemo without mutating old data (368.555066ms)
568
+ upsertData (from WAL): inserted( 0 ) updated( 1 ) total( 1 )
569
+ last insert undefined
570
+ last update {"id":0,"x":232,"last_updated":1790258623995}
571
+ Client log (client) t+ 74666ms 1790258624021: sync stats: x10 -> 0 x20 -> 99
572
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
573
+ last insert undefined
574
+ last update undefined
575
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
576
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
577
+ last insert undefined
578
+ last update undefined x2
579
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
580
+ Client log (client) t+ 74706ms 1790258624061: sync stats: x10 -> 0 x20 -> 99
581
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
582
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
583
+ last insert undefined
584
+ last update undefined x2
585
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
586
+ Client log (client) t+ 74988ms 1790258624343: sync stats: x10 -> 0 x20 -> 99
587
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
588
+ ✔ concurrent useSync hooks with matching options all update (350.163801ms)
589
+ upsertData (from WAL): inserted( 0 ) updated( 1 ) total( 1 )
590
+ last insert undefined
591
+ last update {"id":0,"x":32,"last_updated":1790258624346}
592
+ Client log (client) t+ 75023ms 1790258624378: sync stats: x10 -> 0 x20 -> 99
593
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
594
+ last insert undefined
595
+ last update undefined
596
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 1 ) total( 1 ) undefined
597
+ upsertData (from client): inserted( 0 ) updated( 0 ) total( 1 )
598
+ last insert undefined
599
+ last update undefined
600
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 51 ) total( 52 ) undefined
601
+ Client log (client) t+ 75314ms Reconnected
602
+ Client log (client) t+ 75339ms 1790258624694: sync stats: x10 -> 0 x20 -> 50
603
+ Client log (client) t+ 75347ms TEST_NAME: main Started
604
+ Client log (client) t+ 75363ms 1790258624718: sync stats: x10 -> 0 x20 -> 50
605
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 2 ) total( 2 ) undefined
606
+ server.syncBatch planes: inserted( 0 ) updated( 0 ) deleted( 0 ) pushed to client( 2 ) total( 2 ) undefined
607
+ Client log (client) t+ 80379ms TEST_NAME: main Error: {} {}
608
+ ✖ concurrent useSync hooks receive inserts after reattachment and reconnect (5365.46685ms)
609
+ ✖ React hooks (10023.325477ms)
610
+ Client test failed
611
+ (server): Stopping server ...
612
+ Trace: Error: Timed out waiting for useSync update
613
+ at waitFor (/home/s/prostgles-server-js/tests/client/dist/client/hooks.spec.js:307:19)
614
+ at async TestContext.<anonymous> (/home/s/prostgles-server-js/tests/client/dist/client/hooks.spec.js:284:17)
615
+ at async Test.run (node:internal/test_runner/test:1125:7)
616
+ at async Suite.processPendingSubtests (node:internal/test_runner/test:787:7)
617
+ at Socket.<anonymous> (/home/s/prostgles-server-js/tests/client/dist/client/index.js:75:25)
618
+ at Socket.onack (/home/s/prostgles-server-js/tests/client/node_modules/socket.io-client/build/cjs/socket.js:603:13)
619
+ at Socket.onpacket (/home/s/prostgles-server-js/tests/client/node_modules/socket.io-client/build/cjs/socket.js:517:22)
620
+ at Emitter.emit (/home/s/prostgles-server-js/tests/client/node_modules/@socket.io/component-emitter/lib/cjs/index.js:143:20)
621
+ at /home/s/prostgles-server-js/tests/client/node_modules/socket.io-client/build/cjs/manager.js:246:18
622
+ at process.processTicksAndRejections (node:internal/process/task_queues:89:21)
623
+ Trace: { err: 'Error: Timed out waiting for useSync update', error: {} }
624
+ at stopTest (/home/s/prostgles-server-js/tests/server/dist/server/index.js:89:17)
625
+ at Socket.<anonymous> (/home/s/prostgles-server-js/tests/server/dist/server/index.js:198:21)
626
+ at Socket.emit (node:events:508:28)
627
+ at Socket.emitUntyped (/home/s/prostgles-server-js/tests/server/node_modules/socket.io/dist/typed-events.js:69:22)
628
+ at /home/s/prostgles-server-js/tests/server/node_modules/socket.io/dist/socket.js:697:39
629
+ at process.processTicksAndRejections (node:internal/process/task_queues:85:11)
630
+ ℹ tests 122
631
+ ℹ suites 4
632
+ ℹ pass 120
633
+ ℹ fail 1
634
+ ℹ cancelled 0
635
+ ℹ skipped 1
636
+ ℹ todo 0
637
+ ℹ duration_ms 87983.875117
638
+
639
+ ✖ failing tests:
640
+
641
+ test at ../client/dist/client/hooks.spec.js:257:36
642
+ ✖ concurrent useSync hooks receive inserts after reattachment and reconnect (5365.46685ms)
643
+ Error: Timed out waiting for useSync update
644
+ at waitFor (/home/s/prostgles-server-js/tests/client/dist/client/hooks.spec.js:307:19)
645
+ at async TestContext.<anonymous> (/home/s/prostgles-server-js/tests/client/dist/client/hooks.spec.js:284:17)
646
+ at async Test.run (node:internal/test_runner/test:1125:7)
647
+ at async Suite.processPendingSubtests (node:internal/test_runner/test:787:7)