@@ -9,6 +9,7 @@ exports[`sync - postgres > compacting data - invalidate checkpoint 1`] = `
99 " bucket" : " mybucket[]" ,
1010 " checksum" : - 93886621 ,
1111 " count" : 2 ,
12+ " priority" : 3 ,
1213 },
1314 ],
1415 " last_op_id" : " 2" ,
@@ -44,6 +45,7 @@ exports[`sync - postgres > compacting data - invalidate checkpoint 2`] = `
4445 " bucket" : " mybucket[]" ,
4546 " checksum" : 499012468 ,
4647 " count" : 4 ,
48+ " priority" : 3 ,
4749 },
4850 ],
4951 " write_checkpoint" : undefined ,
@@ -102,6 +104,7 @@ exports[`sync - postgres > expiring token 1`] = `
102104 " bucket" : " mybucket[]" ,
103105 " checksum" : 0 ,
104106 " count" : 0 ,
107+ " priority" : 3 ,
105108 },
106109 ],
107110 " last_op_id" : " 0" ,
@@ -124,6 +127,80 @@ exports[`sync - postgres > expiring token 2`] = `
124127]
125128` ;
126129
130+ exports [` sync - postgres > sync buckets in order 1` ] = `
131+ [
132+ {
133+ " checkpoint" : {
134+ " buckets" : [
135+ {
136+ " bucket" : " b0[]" ,
137+ " checksum" : 920318466 ,
138+ " count" : 1 ,
139+ " priority" : 2 ,
140+ },
141+ {
142+ " bucket" : " b1[]" ,
143+ " checksum" : - 1382098757 ,
144+ " count" : 1 ,
145+ " priority" : 1 ,
146+ },
147+ ],
148+ " last_op_id" : " 2" ,
149+ " write_checkpoint" : undefined ,
150+ },
151+ } ,
152+ {
153+ " data" : {
154+ " after" : " 0" ,
155+ " bucket" : " b1[]" ,
156+ " data" : [
157+ {
158+ " checksum" : 2912868539n ,
159+ " data" : " {" id " :" earlier " ," description " :" Test 2 " }" ,
160+ " object_id" : " earlier" ,
161+ " object_type" : " test" ,
162+ " op" : " PUT" ,
163+ " op_id" : " 2" ,
164+ " subkey" : " 243b0e26-87b2-578a-993c-5ac5b6f7fd64" ,
165+ },
166+ ],
167+ " has_more" : false ,
168+ " next_after" : " 2" ,
169+ },
170+ } ,
171+ {
172+ " partial_checkpoint_complete" : {
173+ " last_op_id" : " 2" ,
174+ " priority" : 1 ,
175+ },
176+ } ,
177+ {
178+ " data" : {
179+ " after" : " 0" ,
180+ " bucket" : " b0[]" ,
181+ " data" : [
182+ {
183+ " checksum" : 920318466n ,
184+ " data" : " {" id " :" t1 " ," description " :" Test 1 " }" ,
185+ " object_id" : " t1" ,
186+ " object_type" : " test" ,
187+ " op" : " PUT" ,
188+ " op_id" : " 1" ,
189+ " subkey" : " 02d285ac-4f96-5124-8fba-c6d1df992dd1" ,
190+ },
191+ ],
192+ " has_more" : false ,
193+ " next_after" : " 1" ,
194+ },
195+ } ,
196+ {
197+ " checkpoint_complete" : {
198+ " last_op_id" : " 2" ,
199+ },
200+ } ,
201+ ]
202+ ` ;
203+
127204exports [` sync - postgres > sync global data 1` ] = `
128205[
129206 {
@@ -133,6 +210,7 @@ exports[`sync - postgres > sync global data 1`] = `
133210 " bucket" : " mybucket[]" ,
134211 " checksum" : - 93886621 ,
135212 " count" : 2 ,
213+ " priority" : 3 ,
136214 },
137215 ],
138216 " last_op_id" : " 2" ,
@@ -184,6 +262,7 @@ exports[`sync - postgres > sync legacy non-raw data 1`] = `
184262 " bucket" : " mybucket[]" ,
185263 " checksum" : - 852817836 ,
186264 " count" : 1 ,
265+ " priority" : 3 ,
187266 },
188267 ],
189268 " last_op_id" : " 1" ,
@@ -231,6 +310,7 @@ exports[`sync - postgres > sync updates to global data 1`] = `
231310 " bucket" : " mybucket[]" ,
232311 " checksum" : 0 ,
233312 " count" : 0 ,
313+ " priority" : 3 ,
234314 },
235315 ],
236316 " last_op_id" : " 0" ,
@@ -256,6 +336,7 @@ exports[`sync - postgres > sync updates to global data 2`] = `
256336 " bucket" : " mybucket[]" ,
257337 " checksum" : 920318466 ,
258338 " count" : 1 ,
339+ " priority" : 3 ,
259340 },
260341 ],
261342 " write_checkpoint" : undefined ,
@@ -299,6 +380,7 @@ exports[`sync - postgres > sync updates to global data 3`] = `
299380 " bucket" : " mybucket[]" ,
300381 " checksum" : - 93886621 ,
301382 " count" : 2 ,
383+ " priority" : 3 ,
302384 },
303385 ],
304386 " write_checkpoint" : undefined ,
0 commit comments