[SERVER-51456] Database Profiler outputs incorrect value of property "keysDeleted" for a remove operation when a write conflict occurs Created: 09/Oct/20  Updated: 29/Oct/23  Resolved: 08/Feb/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 5.0 Desired
Fix Version/s: 5.3.0, 5.0.7, 5.2.2

Type: Bug Priority: Major - P3
Reporter: Mindaugas Malinauskas Assignee: Romans Kasperovics
Resolution: Fixed Votes: 0
Labels: qexec-team
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to SERVER-31739 on failed insert keysInserted should ... Closed
is related to SERVER-31739 on failed insert keysInserted should ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.2, v5.0, v4.4, v4.2
Sprint: Query 2020-11-30, Query 2020-12-14, Query 2020-12-28, Query 2021-01-11, Query 2021-01-25, Query Execution 2021-02-22, QE 2022-02-07, QE 2022-02-21, QE 2022-01-24
Participants:
Linked BF Score: 15

 Description   

Database Profiler outputs incorrect value of property "keysDeleted" for a remove operation when a write conflict occurs. Other write operations and some other properties (like "keysInserted") are probably affected in the same way. Instead of setting "keysDeleted" value to the actual number of index keys deleted, the system accumulates the number of index keys deleted over all operation execution attempts, including retries, that happen in response to write conflicts.

Here is one place where the property "keysDeleted" value is accumulated.



 Comments   
Comment by Githook User [ 15/Feb/22 ]

Author:

{'name': 'Romans Kasperovics', 'email': 'romans.kasperovics@mongodb.com', 'username': 'romanskas'}

Message: SERVER-51456 Database Profiler outputs incorrect value of property "keysDeleted" for a remove operation when a write conflict occurs

(cherry picked from commit 61ba21eac5b59b36e668307adeb043dab8153fb4)
Branch: v5.0
https://github.com/mongodb/mongo/commit/cc099d9838de28af0cd5aed10ddd1943b1081d6f

Comment by Githook User [ 14/Feb/22 ]

Author:

{'name': 'Romans Kasperovics', 'email': 'romans.kasperovics@mongodb.com', 'username': 'romanskas'}

Message: SERVER-51456 Database Profiler outputs incorrect value of property "keysDeleted" for a remove operation when a write conflict occurs
Branch: v5.2
https://github.com/mongodb/mongo/commit/f4c0a71b4fd267c5164b02d25ce05f1b4ca9ee42

Comment by Romans Kasperovics [ 07/Feb/22 ]

Thanks david.storch! I am closing this issue for now and the two related tickets.

Comment by David Storch [ 07/Feb/22 ]

romans.kasperovics I'd argue that this should be backported to 5.2 (the latest rapid release) and 5.0 (the latest LTS release). I'm not sure its worth backporting further? I'll request backport and I suppose we can take the resulting backport tickets through the regular triage process.

In the meantime, this ticket can be closed as "Fixed" with a fixVersion of 5.3.0.

Comment by Romans Kasperovics [ 07/Feb/22 ]

The BF happened on 4.7. Do we need to downport this fix?

Comment by Githook User [ 07/Feb/22 ]

Author:

{'name': 'Romans Kasperovics', 'email': 'romans.kasperovics@mongodb.com', 'username': 'romanskas'}

Message: SERVER-51456 Database Profiler outputs incorrect value of property "keysDeleted" for a remove operation when a write conflict occurs
Branch: master
https://github.com/mongodb/mongo/commit/61ba21eac5b59b36e668307adeb043dab8153fb4

Comment by Mindaugas Malinauskas [ 01/Mar/21 ]

Assigning to quick wins.

Generated at Thu Feb 08 05:25:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.