Open sync-by-unito[bot] opened 2 years ago
➤ Jørgen Edelbo commented:
[~jonathan.reams@mongodb.com] looks like you would be the most obvious candidate to follow up on this.
➤ Tyler Kaye commented:
Im also going to devote some more time today to look into this
➤ Tyler Kaye commented:
This kind of seems like a smoking gun in some senses that client-reciprocal history isnt working as it should:
Connection[1]: Session[1]: Fetching changeset for upload (client_version=59, server_version=25, changeset_size=84, origin_timestamp=229979569269, origin_file_ident=0)
Connection[1]: Session[1]: Changeset: 3F 00 17 53 69 6D 70 6C 65 50 72 69 6D 61 72 79 4B 65 79 4F 62 6A 65 63 74 32 3F 01 07 73 6D 70 53 65 6C 66 0A 00 01 00 01 01 00 02 0A 00 01 00 01 01 00 01 3F 02 16 53 69 6D 70 6C 65 50 72 69 6D 61 72 79 4B 65 79 4F 62 6A 65 63 74 3F 03 00 03 02 03 03
Connection[1]: Session[1]: Changeset (parsed):
InternStrings 0="SimplePrimaryKeyObject2", 1="smpSelf", 2="SimplePrimaryKeyObject", 3=""
ArrayErase path=SimplePrimaryKeyObject2[Int(0)].smpSelf[0], prior_size=2
ArrayErase path=SimplePrimaryKeyObject2[Int(0)].smpSelf[0], prior_size=1
EraseObject path=SimplePrimaryKeyObject[""]
Connection[1]: Download message compression: is_body_compressed = false, compressed_body_size=96, uncompressed_body_size=96
Connection[1]: Received: DOWNLOAD CHANGESET(server_version=26, client_version=17, origin_timestamp=229979567702, origin_file_ident=3, original_changeset_size=69, changeset_size=69)
Connection[1]: Changeset: 3F 00 17 53 69 6D 70 6C 65 50 72 69 6D 61 72 79 4B 65 79 4F 62 6A 65 63 74 32 3F 01 03 6F 69 64 3F 02 07 73 6D 70 53 65 6C 66 04 00 01 00 01 00 0A 62 59 C3 AF 3A C2 22 4E 30 E3 04 04 00 0B 00 01 00 02 00 00
Connection[1]: Changeset (parsed):
InternStrings 0="SimplePrimaryKeyObject2", 1="oid", 2="smpSelf"
Update path=SimplePrimaryKeyObject2[Int(0)].oid, value=ObjectId(6259c3af3ac2224e30e30404), default=0
Clear path=SimplePrimaryKeyObject2[Int(0)].smpSelf
Connection[1]: Session[1]: Received: DOWNLOAD(download_server_version=26, download_client_version=17, latest_server_version=26, latest_server_version_salt=3623958271689214923, upload_client_version=26, upload_server_version=7, downloadable_bytes=0, last_in_batch=true, query_version=0, num_changesets=1, ...)
Connection[1]: Session[1]: Scanning incoming changeset [1/1] (2 instructions)
Connection[1]: Session[1]: Scanning local changeset [1/12] (4 instructions)
Connection[1]: Session[1]: Scanning local changeset [2/12] (3 instructions)
Connection[1]: Session[1]: Scanning local changeset [3/12] (3 instructions)
Connection[1]: Session[1]: Scanning local changeset [4/12] (1 instructions)
Connection[1]: Session[1]: Scanning local changeset [5/12] (4 instructions)
Connection[1]: Session[1]: Scanning local changeset [6/12] (1 instructions)
Connection[1]: Session[1]: Scanning local changeset [7/12] (4 instructions)
Connection[1]: Session[1]: Scanning local changeset [8/12] (1 instructions)
Connection[1]: Session[1]: Scanning local changeset [9/12] (1 instructions)
Connection[1]: Session[1]: Scanning local changeset [10/12] (3 instructions)
Connection[1]: Session[1]: Scanning local changeset [11/12] (4 instructions)
Connection[1]: Session[1]: Scanning local changeset [12/12] (1 instructions)
Connection[1]: Session[1]: Indexing incoming changeset [1/1] (2 instructions)
Connection[1]: Session[1]: Finished changeset indexing (incoming: 1 changeset(s) / 2 instructions, local: 12 changeset(s) / 30 instructions, conflict group(s): 1)
Connection[1]: Session[1]: Transforming local changeset [1/12] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [2/12] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [3/12] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [4/12] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [5/12] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [6/12] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [7/12] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [8/12] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [9/12] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [10/12] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [11/12] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [12/12] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Finished transforming 12 local changesets through 1 incoming changesets (30 vs 2 instructions, in 1 conflict groups)
Connection[1]: Session[1]: 1 remote changeset integrated, producing client version 66
Connection[1]: Session[1]: Progress handler called, downloaded = 613, downloadable(total) = 613, uploaded = 953, uploadable = 1887, reliable_download_progress = true, snapshot version = 66
Connection[1]: Download message compression: is_body_compressed = false, compressed_body_size=103, uncompressed_body_size=103
Connection[1]: Received: DOWNLOAD CHANGESET(server_version=29, client_version=26, origin_timestamp=229979567833, origin_file_ident=3, original_changeset_size=76, changeset_size=76)
Connection[1]: Changeset: 3F 00 17 53 69 6D 70 6C 65 50 72 69 6D 61 72 79 4B 65 79 4F 62 6A 65 63 74 32 3F 01 07 73 6D 70 53 65 6C 66 3F 02 16 53 69 6D 70 6C 65 50 72 69 6D 61 72 79 4B 65 79 4F 62 6A 65 63 74 3F 03 00 08 00 01 00 01 01 00 09 02 03 03 00
Connection[1]: Changeset (parsed):
InternStrings 0="SimplePrimaryKeyObject2", 1="smpSelf", 2="SimplePrimaryKeyObject", 3=""
ArrayInsert path=SimplePrimaryKeyObject2[Int(0)].smpSelf[0], value=Link(target_table = SimplePrimaryKeyObject, target = ""), prior_size=0
Connection[1]: Session[1]: Received: DOWNLOAD(download_server_version=29, download_client_version=26, latest_server_version=29, latest_server_version_salt=214910417733174547, upload_client_version=28, upload_server_version=8, downloadable_bytes=0, last_in_batch=true, query_version=0, num_changesets=1, ...)
Connection[1]: Session[1]: Scanning incoming changeset [1/1] (1 instructions)
Connection[1]: Session[1]: Scanning local changeset [1/11] (3 instructions)
Connection[1]: Session[1]: Scanning local changeset [2/11] (3 instructions)
Connection[1]: Session[1]: Scanning local changeset [3/11] (1 instructions)
Connection[1]: Session[1]: Scanning local changeset [4/11] (4 instructions)
Connection[1]: Session[1]: Scanning local changeset [5/11] (1 instructions)
Connection[1]: Session[1]: Scanning local changeset [6/11] (4 instructions)
Connection[1]: Session[1]: Scanning local changeset [7/11] (1 instructions)
Connection[1]: Session[1]: Scanning local changeset [8/11] (1 instructions)
Connection[1]: Session[1]: Scanning local changeset [9/11] (1 instructions)
Connection[1]: Session[1]: Scanning local changeset [10/11] (4 instructions)
Connection[1]: Session[1]: Scanning local changeset [11/11] (1 instructions)
Connection[1]: Session[1]: Indexing incoming changeset [1/1] (1 instructions)
Connection[1]: Session[1]: Finished changeset indexing (incoming: 1 changeset(s) / 1 instructions, local: 11 changeset(s) / 24 instructions, conflict group(s): 1)
Connection[1]: Session[1]: Transforming local changeset [1/11] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [2/11] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [3/11] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [4/11] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [5/11] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [6/11] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [7/11] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [8/11] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [9/11] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [10/11] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Transforming local changeset [11/11] through 1 incoming changeset(s) with 1 conflict group(s)
Connection[1]: Session[1]: Finished transforming 11 local changesets through 1 incoming changesets (24 vs 1 instructions, in 1 conflict groups)
Connection[1]: Session[1]: Failed to integrate downloaded changesets: Failed to parse, or apply received changeset: ArrayInsert: Invalid prior_size (list size = 0, prior_size = 2) (instruction target: SimplePrimaryKeyObject2[Int(0)].smpSelf[0], version: 29, last_integrated_remote_version: 27, origin_file_ident: 3, timestamp: 229979567833)
➤ Tyler Kaye commented:
Still looking into this a bit and the error definitely seems related to Clear instructions. We did find a very similar issue here: https://jira.mongodb.org/browse/RCORE-860
Having a tough time reproducing this in our E2E tests but will keep trying
➤ Finn Andersen commented:
[~jonathan.reams@mongodb.com] [~tyler.kaye@mongodb.com] I heard several sync related bugs was fixed lately. Any updates on this issue?
➤ Nicola Cabiddu commented:
This seems an instance of https://jira.mongodb.org/browse/RCORE-860, [~jonathan.reams@mongodb.com] can I move this under your umbrella?
➤ Jonathan Reams commented:
Sending this to the backlog for now. Def something we want to look at more, but not a high priority right now.
Fairly simple repro case. Here is the schema:
The repro code is fairly straightforward:
Spawning a bunch of threads, 3 users will randomly add, delete, or modify/add to the list property on SimplePrimaryKeyObject2. The test can repro the error with both lists of links or primitives.
Attaching client logs, server logs, and db dump. cc [~tyler.kaye@mongodb.com] [~mikeo@mongodb.com]