mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
mdssvc: add and use SL_PAGESIZE
SL_PAGESIZE is the number of entries we want to process per paged search result set. This is different from MAX_SL_RESULTS which ought to be a default maximum value for total number of results returned for a search query. 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> (cherry picked from commit 086c2602d074d4dc0d44f5534857e5f59a8690b2)
This commit is contained in:
parent
7d5e9f5fc2
commit
60fdb3adbe
@ -36,6 +36,7 @@
|
||||
|
||||
#define MAX_SL_FRAGMENT_SIZE 0xFFFFF
|
||||
#define MAX_SL_RESULTS 100
|
||||
#define SL_PAGESIZE 100
|
||||
#define MAX_SL_RUNTIME 30
|
||||
#define MDS_TRACKER_ASYNC_TIMEOUT_MS 250
|
||||
|
||||
|
@ -398,7 +398,7 @@ static bool mds_es_search(struct sl_query *slq)
|
||||
.ev = mds_es_ctx->mdssvc_es_ctx->mdssvc_ctx->ev_ctx,
|
||||
.mds_es_ctx = mds_es_ctx,
|
||||
.slq = slq,
|
||||
.size = MAX_SL_RESULTS,
|
||||
.size = SL_PAGESIZE,
|
||||
};
|
||||
|
||||
/* 0 would mean no limit */
|
||||
@ -502,7 +502,7 @@ static void mds_es_search_done(struct tevent_req *subreq)
|
||||
goto trigger;
|
||||
}
|
||||
|
||||
if (slq->query_results->num_results >= MAX_SL_RESULTS) {
|
||||
if (slq->query_results->num_results >= SL_PAGESIZE) {
|
||||
slq->state = SLQ_STATE_FULL;
|
||||
goto trigger;
|
||||
}
|
||||
@ -693,7 +693,7 @@ static void mds_es_search_http_send_done(struct tevent_req *subreq)
|
||||
subreq = http_read_response_send(state,
|
||||
state->ev,
|
||||
state->s->mds_es_ctx->http_conn,
|
||||
MAX_SL_RESULTS * 8192);
|
||||
SL_PAGESIZE * 8192);
|
||||
if (tevent_req_nomem(subreq, req)) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user