Skip to content

TableInfo index refresh fails when secondary indexes are present #75

@mattsb42-aws

Description

@mattsb42-aws

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'

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions