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

multiple gsi #11

Closed
klinquist opened this issue Feb 14, 2015 · 1 comment
Closed

multiple gsi #11

klinquist opened this issue Feb 14, 2015 · 1 comment

Comments

@klinquist
Copy link

Amazon now allows for multiple gsis.. I'm thinking that may be the cause of this failure:

python dynamobackup.py -m restore -r us-west-2 -s dev_UserSeeds -d dev_UserSeeds4
INFO:root:dev_UserSeeds4 table deleted!
INFO:root:Starting restore for dev_UserSeeds to dev_UserSeeds4..
INFO:root:Creating dev_UserSeeds4 table with temp write capacity of 100
INFO:root:Waiting for dev_UserSeeds4 table to be created.. [CREATING]
INFO:root:Waiting for dev_UserSeeds4 table to be created.. [CREATING]
INFO:root:dev_UserSeeds4 created.
INFO:root:Restoring data for dev_UserSeeds4 table..
INFO:root:Processing 0001.json of dev_UserSeeds4
Traceback (most recent call last):
File "dynamobackup.py", line 419, in
do_restore(conn, sleep_interval, args.srcTable, dest_table, args.writeCapacity)
File "dynamobackup.py", line 291, in do_restore
batch_write(conn, sleep_interval, destination_table, put_requests)
File "dynamobackup.py", line 118, in batch_write
response = conn.batch_write_item(request_items)
File "/Library/Python/2.7/site-packages/boto/dynamodb2/layer1.py", line 420, in batch_write_item
body=json.dumps(params))
File "/Library/Python/2.7/site-packages/boto/dynamodb2/layer1.py", line 2842, in make_request
retry_handler=self._retry_handler)
File "/Library/Python/2.7/site-packages/boto/connection.py", line 953, in _mexe
status = retry_handler(response, i, next_sleep)
File "/Library/Python/2.7/site-packages/boto/dynamodb2/layer1.py", line 2882, in _retry_handler
response.status, response.reason, data)
boto.dynamodb2.exceptions.ValidationException: ValidationException: 400 Bad Request
{u'message': u'One or more parameter values were invalid: Type mismatch for Index Key thingId Expected: S Actual: M IndexName: gsi_UserSeeds_thingId', u'__type': u'com.amazon.coral.validate#ValidationException'}

@klinquist
Copy link
Author

Nevermind. I had some junk data in my source table.

I put a try/catch around the batch_write to solve. Of course, I end up losing any other writes in the MAX_BATCH_WRITE.

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

1 participant