[SERVER-17915] Partial indexes should not be allowed as shard key Created: 07/Apr/15  Updated: 19/Sep/15  Resolved: 29/Apr/15

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: 3.1.1
Fix Version/s: 3.1.3

Type: Bug Priority: Major - P3
Reporter: Michael Grundy Assignee: J Rassi
Resolution: Done Votes: 0
Labels: 32qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

    var st = new ShardingTest({ shards: 2 }); 
 
    var testDB = st.s.getDB('test');
    testDB.dropDatabase();
    var testCol = testDB.getCollection('partialTest');
 
    testCol.ensureIndex({a:1},{b:{$exists:1}});
    testDB.adminCommand({ enablesharding: 'test' }); 
    assert.commandFailed(testDB.adminCommand({ shardcollection: 'test.partialTest', key: { a : 1 }}));

Sprint: Quint Iteration 3.1.2, Quint Iteration 3
Participants:

 Description   

Partial indexes shouldn't be allowed to be used as the shard key.



 Comments   
Comment by Githook User [ 29/Apr/15 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-17915 Partial indexes shouldn't be eligible as shard key index

Comment by Githook User [ 29/Apr/15 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-17915 shardCollection shouldn't consider partial index useful
Branch: master
https://github.com/mongodb/mongo/commit/59d18d4cac011174d1b1f566e89aea3cb74ca8f5

Generated at Thu Feb 08 03:45:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.