Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support compound sharding keys #142

Open
shortdudey123 opened this issue Apr 12, 2017 · 1 comment
Open

support compound sharding keys #142

shortdudey123 opened this issue Apr 12, 2017 · 1 comment
Milestone

Comments

@shortdudey123
Copy link
Contributor

Copied from edelight/chef-mongodb#158

Hi,

We are trying to deploy a complete sharded environment using a compound shard key. We have modified the libraries/mongodb.rb to allow this:

sharded_collections.each do |name, key|
      cmd = BSON::OrderedHash.new
      cmd['shardcollection'] = name
      cmd['key'] = key # before {key => 1} 
      begin

and the sharding key is defined in role like this:

     "sharded_collections": {
        "db.col":{       
          "field1": 1,
          "field2": 1
        }
      }

so far we have only managed to get this error,

Error executing action `create` on resource 'ruby_block[config_sharding]'

trying to execute the line 311:

result = admin.command(cmd, :check_response => false)
@shortdudey123 shortdudey123 added this to the 1.0.0 milestone Apr 12, 2017
@shortdudey123 shortdudey123 modified the milestones: 2.0.0, 1.0.0 May 20, 2017
@github-actions
Copy link

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

@github-actions github-actions bot added the Stale label Sep 30, 2020
@xorimabot xorimabot removed the Stale label Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants