You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to limit the records returned by a query using statement max records or policy short query but it does not work. In the example bellow we expect ~10 records, but for some cases we get 100k. At this point we are using C# client version 5.3.2 but upgrading to 5.4.x or even 6.x does not change this behavior.
var queryPolicy = new QueryPolicy
{
shortQuery = true,
totalTimeout = 10000,
readModeSC = ReadModeSC.ALLOW_REPLICA,
includeBinData = false,
maxRetries = 0,
};
var stmt = new Statement();
stmt.SetNamespace("namespace");
stmt.SetSetName("setname");
stmt.MaxRecords = 10;
stmt.SetFilter(Filter.Equal("binname", "binvalue"));
var result = client.Query(queryPolicy, stmt);
int count = 0;
while (result.Next())
{
count++;
}
Console.WriteLine(count);`
The text was updated successfully, but these errors were encountered:
Can you tell me what server version you were using? I ran a test using server EE 7.0.0 and C# client version 7.0.1 and I am unable to replicate the issue you are seeing.
MaxRecords is supported by the server starting in EE 6.0.0. I tested with EE 6.0.0 and C# client 5.3.2 and MaxRecords is working for me, so I recommend upgrading to at least EE 6.0.0.
We are trying to limit the records returned by a query using statement max records or policy short query but it does not work. In the example bellow we expect ~10 records, but for some cases we get 100k. At this point we are using C# client version 5.3.2 but upgrading to 5.4.x or even 6.x does not change this behavior.
The text was updated successfully, but these errors were encountered: