Skip to content

TableInfo index refresh fails when secondary indexes are present #75

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

Closed
mattsb42-aws opened this issue May 19, 2018 · 0 comments
Closed
Assignees
Labels

Comments

@mattsb42-aws
Copy link
Member

We don't actually use the secondary indexes for anything, but TableInfo is opportunistically collecting them when refreshing index data. Unfortunately, TableIndex objects are not hashable, we are currently storing them in a set, and apparently this slipped through the cracks in testing...so that fails.

>>> table_info.refresh_indexed_attributes(client)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/bullocm/git/aws-dynamodb-encryption-python/.tox/py36-local-fast/lib/python3.6/site-packages/dynamodb_encryption_sdk/structures.py", line 385, in refresh_indexed_attributes
    self._secondary_indexes.add(TableIndex.from_key_schema(index['KeySchema']))
TypeError: unhashable type: 'TableIndex'
@mattsb42-aws mattsb42-aws self-assigned this May 19, 2018
lizroth added a commit that referenced this issue May 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant