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

Issues in Service Fabric Queryable extensions #15

Open
SrinivasVelpula opened this issue Nov 26, 2018 · 6 comments
Open

Issues in Service Fabric Queryable extensions #15

SrinivasVelpula opened this issue Nov 26, 2018 · 6 comments

Comments

@SrinivasVelpula
Copy link

SrinivasVelpula commented Nov 26, 2018

am working on integrating the Queryable extensions of ReliableIndexDictionary and facing few challenges on querying the Reliable Dictionary. Below are the exception details with respect to the query I am performing.

Reliable Indexed Dictionary:

var dictionary = await this.StateManager.GetOrAddIndexedAsync<Guid, File>(
                       "FileDictionaryName",                     
                      new FilterableIndex<Guid, File, string>(nameof(File.FriendlyFileName), (k, v) => v.fileName),                   
                        new FilterableIndex<Guid, File, long>(nameof(File.FileSizeInBytes), (k, v) => v.FileSizeInBytes.GetValueOrDefault()),
                       new SearchableIndex<Guid, File>(nameof(File.FileName), (k, v) => v.fileName)).ConfigureAwait(false);
Queryable Indexed Dictionary:

var queryableDictionary = new QueryableReliableIndexedDictionary<Guid, File, File >(dictionary, this.StateManager);

NOTE: We are unable to get all the records in the collection.

Can anyone please help out on this?

I have posted a question in stack over flow below is the link and issue details,
https://stackoverflow.com/questions/53482969/service-fabric-queryable-extensions-facing-issues-while-performing-linq-queri

@jessebenson
Copy link
Owner

Note that to use this extension, you must use the Queryable dictionary when adding/updating/removing entries to the dictionary (i.e. use queryableDictionary and not dictionary in your code above). Otherwise, the underlying index will be out-of-sync with the contents of the reliable dictionary. Can you confirm that you are doing this?

@SrinivasVelpula
Copy link
Author

We are using the same querable dictionary for creating updating deleting an retrieving

@SrinivasVelpula
Copy link
Author

We are using the same querable dictionary for creating updating deleting an retrieving.
Issues am facing documented in below link , could you please check and help me out to fix this issue
https://stackoverflow.com/questions/53482969/service-fabric-queryable-extensions-facing-issues-while-performing-linq-queri

@jessebenson
Copy link
Owner

The LINQ implementation was a contribution. I suspect the LINQ implementation is not complete. You can see and attempt to fix the code here:
https://github.com/jessebenson/service-fabric-queryable/blob/master/src/ServiceFabric.Extensions.Services.Queryable/LINQ/ReliableIndexedDictionaryQueryContext.cs

The alternative is to use the OData syntax to query ...

@SrinivasVelpula
Copy link
Author

Thanks, Jesse for your suggestions.

We can't use OData in our application, which will fetch entire data and perform querying on that. It will impact our performance(our collections will have huge data). Correct us if we are wrong.

And coming to the extension of Linq features, do you have any plan to implement them in the future? If yes can you provide us the release plan for the above issues? Such that we can plan our development on extending this features.

@jessebenson
Copy link
Owner

The OData syntax is just a particular string format (no need to include OData packages/etc.) on how you structure the queries - i.e. rather than using LINQ. It's something to consider.

The LINQ provider was a contribution, so I welcome additional contributions if you would like to take a stab at the fix! I don't have a timeline for a fix or investigation, unfortunately.

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