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

Cannot have bool? as a property type when using RedisCache #48

Open
megyfexid opened this issue Sep 3, 2017 · 1 comment
Open

Cannot have bool? as a property type when using RedisCache #48

megyfexid opened this issue Sep 3, 2017 · 1 comment

Comments

@megyfexid
Copy link

megyfexid commented Sep 3, 2017

If you try to use bool? as a property type it breaks RedisCache:
3/09/2017 1:01:42 PM RedisTableCache(Customer) : Failed to load index (:Author Equal 1) from cache. Linq2DynamoDb.DataContext.Caching.Redis.RedisCacheException: Index is being rebuilt
at Linq2DynamoDb.DataContext.Caching.Redis.RedisTableCache.RedisIndex.LoadIndexEntities(RedisWrapper redis, String indexKey, String indexListKey)
at Linq2DynamoDb.DataContext.Caching.Redis.RedisTableCache.GetEntities(SearchConditions searchConditions, IEnumerable`1 projectedFields, String orderByFieldName, Boolean orderByDesc)
3/09/2017 1:01:43 PM RedisTableCache(Customer) : Index (Author Equal 1) was marked as being rebuilt
Customer : DynamoDb index query: SELECT * FROM Customer WHERE Author Equal 1. Index name: AuthorIndex

It will always say "Index is being rebuilt" doesn't matter how many times you reload for DynamoDb.

The workaround at the moment is to use string instead of bool?.

Nullable types make for very efficient Global Secondary Indexes and is a recommended best practice for dynamodb.

@scale-tone
Copy link
Owner

Yes, I can confirm, that Linq2DynamoDb.DataContext.Caching.Redis fails with nullable fields. Must be some kind of serialization issue. Will take a closer look...

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