[SERVER-84667] index check, avoid create duplicate btree indexes, Avoid affecting performance and increases storage consts. Created: 09/Jan/24  Updated: 24/Jan/24  Resolved: 24/Jan/24

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: y yz Assignee: Daotang Yang
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
backports SERVER-78199 btree index check, avoid create dupli... Closed
Related
is related to SERVER-27464 Server allows creation of duplicate i... Backlog
Operating System: ALL
Sprint: Execution Team 2024-01-22, Execution Team 2024-02-05
Participants:

 Description   

btree index check, avoid create duplicate btree indexes, Avoid affecting performance

btree index check, avoid create duplicate btree indexes, Avoid affecting performance by the deplicate index.
for example:
add two index: db.collection.createIndex({a:1}) and db.collection.createIndex({a:11})
the tow index are actually the same, One of them is a useless index, but it can affect the insert performance.

In addition, They also affecting query performance because both are candidate indexes. This increases storage consts.



 Comments   
Comment by Daotang Yang [ 24/Jan/24 ]

A complete fix would need index and driver versioning.

Comment by Daotang Yang [ 18/Jan/24 ]

There's backward compatibility concern with existing apps. Not being able to create duplicate index itself is not backward compatible which might break existing app. For example mongosync might encounter error when syncing from a cluster which has duplicate indexes (not confirmed, but in theory this can be the case).

Comment by Daotang Yang [ 12/Jan/24 ]

1147952115@qq.com please check again, it should be there now.

Comment by y yz [ 12/Jan/24 ]

hi, daotang.yang@mongodb.com 

sorry, I haven't seen any comments in https://github.com/mongodb/mongo/pull/1588, can you send a link.

thanks

Comment by Daotang Yang [ 11/Jan/24 ]

1147952115@qq.com Thanks for the effort. I left a comment on the new PR, once that's addressed, this is good to go.

Comment by y yz [ 09/Jan/24 ]

https://github.com/mongodb/mongo/pull/1588

Comment by y yz [ 09/Jan/24 ]

related with: SERVER-78199

 

this is the master PR.

thanks.

Generated at Thu Feb 08 06:55:38 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.