mdssvc: set query state for continued queries to SLQ_STATE_RUNNING
authorRalph Boehme <slow@samba.org>
Wed, 19 Apr 2023 12:38:45 +0000 (14:38 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 26 Jul 2023 22:43:38 +0000 (22:43 +0000)
SLQ_STATE_RESULTS implies that there are already results attached to the slq
which is not the case. Instead the backend will start processing from where it
left off when it hits the maximum result limit and had set the state to
SLQ_STATE_FULL.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15342

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/rpc_server/mdssvc/mdssvc.c

index 335b267c0e5ec967617f14ae69be8729ed2d3b6b..371282a8206b4bbcf4e19987a915f77332aedfd3 100644 (file)
@@ -1126,7 +1126,7 @@ static bool slrpc_fetch_query_results(struct mds_ctx *mds_ctx,
                        goto error;
                }
                if (slq->state == SLQ_STATE_FULL) {
-                       slq->state = SLQ_STATE_RESULTS;
+                       slq->state = SLQ_STATE_RUNNING;
                        slq->mds_ctx->backend->search_cont(slq);
                }
                break;