I'm trying to read the records from Azure table storage. I have a simple query while pulling the records
var isPagination = true;
var combinedFilter = "groupCode eq '9THS'";
var query = new TableQuery<AzStorageEntityAdapter<T>>().Where(combinedFilter);
TableRequestOptions tableRequestOptions = new TableRequestOptions()
{ ServerTimeout = TimeSpan.FromSeconds(90) };
do
{
var segments = await table.ExecuteQuerySegmentedAsync(query, continuationToken, tableRequestOptions, null);
currentPageResult.AddRange(segments.Results.Select(s => s.InnerObject).ToList());
continuationToken = segments.ContinuationToken;
} while (continuationToken != null && !isPagination);;
It was working till the azure table had less number of records(10000) with say 3 to 4 distinct Groupcodes
.
When the table size increased over 200000 records, the search will not return any records (i.e) segments.Results
has zero records, but the continuationToken
has values.
If I replace the the ExecuteQuerySegmentedAsync
with ExecuteQuery
it returns the expected records. I tried to add ServerTimeout
, MaximumExecutionTime
nothing helped.
Whats wrong here ?