]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
mdssvc: reduce pagesize to 50
authorRalph Boehme <slow@samba.org>
Thu, 20 Apr 2023 15:27:20 +0000 (17:27 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 26 Jul 2023 22:43:38 +0000 (22:43 +0000)
Lastest macOS queries additional file metadata per search result, which causes
the mashalled paged result set including metadata to exceed the 64 KB result
fragment buffer.

Lacking fragementation support in mdssvc (it's supported by the protocol), for
now just reduce the maximum number of results per search page.

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>
python/samba/tests/blackbox/mdsearch.py
python/samba/tests/dcerpc/mdssvc.py
source3/rpc_server/mdssvc/mdssvc.h

index c8e75661f151ac0c0eba1fb7663abbc291fad9f7..46af6f94624d047dacf13c7208de49d3e3be95e6 100644 (file)
@@ -100,7 +100,7 @@ class MdfindBlackboxTests(BlackboxTestCase):
         config = os.environ["SMB_CONF_PATH"]
 
         json_in = r'''{
-          "from": 0, "size": 100, "_source": ["path.real"],
+          "from": 0, "size": 50, "_source": ["path.real"],
           "query": {
             "query_string": {
               "query": "(samba*) AND path.real.fulltext:\"%BASEPATH%\""
index 985f35aa725d9beda6bb954be4d56f9d09759f19..7d09a5559366fc13a336176f96b1c42fdc7072a8 100644 (file)
@@ -125,7 +125,7 @@ class MdssvcTests(RpcInterfaceTestCase):
 
     def test_mdscli_search(self):
         exp_json_query = r'''{
-          "from": 0, "size": 100, "_source": ["path.real"],
+          "from": 0, "size": 50, "_source": ["path.real"],
           "query": {
             "query_string": {
               "query": "(samba*) AND path.real.fulltext:\"%BASEPATH%\""
@@ -157,7 +157,7 @@ class MdssvcTests(RpcInterfaceTestCase):
             r'kMDItemFSName=="x\\x"'
         )
         exp_json_query = r'''{
-          "from": 0, "size": 100, "_source": ["path.real"],
+          "from": 0, "size": 50, "_source": ["path.real"],
           "query": {
             "query_string": {
               "query": "(file.filename:x\\+x OR file.filename:x\\*x OR file.filename:x=x OR file.filename:x'x OR file.filename:x\\?x OR file.filename:x\\ x OR file.filename:x\\(x OR file.filename:x\\\"x OR file.filename:x\\\\x) AND path.real.fulltext:\"%BASEPATH%\""
index 7ac64311ec7654c03f77d59c03be90a602def3a0..6d4e684ae8d862baad50a3138074fc62164b28b7 100644 (file)
@@ -35,7 +35,7 @@
 #undef FALSE
 
 #define MAX_SL_RESULTS 100
-#define SL_PAGESIZE 100
+#define SL_PAGESIZE 50
 #define MAX_SL_RUNTIME 30
 #define MDS_TRACKER_ASYNC_TIMEOUT_MS 250