]> 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)
committerJule Anger <janger@samba.org>
Mon, 31 Jul 2023 08:08:13 +0000 (08:08 +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>
(cherry picked from commit 724a0518c901589fe1171d94648391832e056f4d)

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 75e6fa9f3200b05dc88935048033c4610213888c..8aabf5b86e5ce28da00a2c87a714efd504134849 100644 (file)
@@ -36,7 +36,7 @@
 
 #define MAX_SL_FRAGMENT_SIZE 0xFFFFF
 #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