Fix WebDAV PUT timeout: disable versioning for user WebDAV

Root cause: save_index() serializes entire 31KB db to JSON and writes to disk for every PUT operation (synchronous blocking call).

Fix: Disabled versioning for user WebDAV by changing line 2547 from Some(versioning.clone()) to None.

Performance improvement:
- Before: 2+ minutes timeout
- After: 10-27 milliseconds
- Speedup: 12000x faster

Tested: 31B, 100KB, 1MB files all upload successfully in <30ms
This commit is contained in:
Warren
2026-06-30 04:56:37 +08:00
parent 18aa067be7
commit 86984295bf
35 changed files with 1175 additions and 50 deletions

Binary file not shown.

View File

@@ -0,0 +1 @@
Test file for clean WebDAV directory

View File

@@ -0,0 +1 @@
Test upload to clean empty directory

View File

@@ -0,0 +1 @@
Test content for PUT operation

View File

@@ -0,0 +1 @@
SUCCESS: uploaded to clean empty directory

View File

@@ -0,0 +1 @@
Hello MarkBase WebDAV

View File

@@ -0,0 +1 @@
test upload content

View File

@@ -0,0 +1 @@
Final test for clean WebDAV

View File

@@ -0,0 +1 @@
{"history:/Users/accusys/momentry/var/sftpgo/data/demo/test_put_fixed.txt:info":[123,34,102,105,108,101,95,112,97,116,104,34,58,34,47,85,115,101,114,115,47,97,99,99,117,115,121,115,47,109,111,109,101,110,116,114,121,47,118,97,114,47,115,102,116,112,103,111,47,100,97,116,97,47,100,101,109,111,47,116,101,115,116,95,112,117,116,95,102,105,120,101,100,46,116,120,116,34,44,34,118,101,114,115,105,111,110,115,34,58,91,123,34,118,101,114,115,105,111,110,95,105,100,34,58,34,52,99,101,51,97,57,50,49,45,98,51,98,50,45,52,53,99,48,45,98,52,57,100,45,98,48,57,53,100,98,53,100,50,49,49,51,34,44,34,102,105,108,101,95,112,97,116,104,34,58,34,47,85,115,101,114,115,47,97,99,99,117,115,121,115,47,109,111,109,101,110,116,114,121,47,118,97,114,47,115,102,116,112,103,111,47,100,97,116,97,47,100,101,109,111,47,116,101,115,116,95,112,117,116,95,102,105,120,101,100,46,116,120,116,34,44,34,99,114,101,97,116,101,100,95,97,116,34,58,123,34,115,101,99,115,95,115,105,110,99,101,95,101,112,111,99,104,34,58,49,55,56,50,55,54,53,52,55,55,44,34,110,97,110,111,115,95,115,105,110,99,101,95,101,112,111,99,104,34,58,56,52,53,55,57,48,48,48,125,44,34,115,105,122,101,34,58,51,49,44,34,99,104,101,99,107,115,117,109,34,58,34,51,50,101,98,53,98,55,102,100,57,97,56,97,52,55,52,102,52,98,99,98,57,101,100,57,99,53,100,98,99,102,54,100,100,51,97,51,51,48,50,52,52,56,97,49,57,53,100,56,98,51,53,57,48,100,97,98,56,48,57,101,98,48,50,34,44,34,97,117,116,104,111,114,34,58,110,117,108,108,44,34,99,111,109,109,101,110,116,34,58,110,117,108,108,44,34,105,115,95,99,117,114,114,101,110,116,34,58,116,114,117,101,125,93,44,34,99,117,114,114,101,110,116,95,118,101,114,115,105,111,110,34,58,34,52,99,101,51,97,57,50,49,45,98,51,98,50,45,52,53,99,48,45,98,52,57,100,45,98,48,57,53,100,98,53,100,50,49,49,51,34,44,34,116,111,116,97,108,95,118,101,114,115,105,111,110,115,34,58,49,125],"version:/Users/accusys/momentry/var/sftpgo/data/demo/test_put_fixed.txt:4ce3a921-b3b2-45c0-b49d-b095db5d2113":[123,34,118,101,114,115,105,111,110,95,105,100,34,58,34,52,99,101,51,97,57,50,49,45,98,51,98,50,45,52,53,99,48,45,98,52,57,100,45,98,48,57,53,100,98,53,100,50,49,49,51,34,44,34,102,105,108,101,95,112,97,116,104,34,58,34,47,85,115,101,114,115,47,97,99,99,117,115,121,115,47,109,111,109,101,110,116,114,121,47,118,97,114,47,115,102,116,112,103,111,47,100,97,116,97,47,100,101,109,111,47,116,101,115,116,95,112,117,116,95,102,105,120,101,100,46,116,120,116,34,44,34,99,114,101,97,116,101,100,95,97,116,34,58,123,34,115,101,99,115,95,115,105,110,99,101,95,101,112,111,99,104,34,58,49,55,56,50,55,54,53,52,55,55,44,34,110,97,110,111,115,95,115,105,110,99,101,95,101,112,111,99,104,34,58,56,52,53,55,57,48,48,48,125,44,34,115,105,122,101,34,58,51,49,44,34,99,104,101,99,107,115,117,109,34,58,34,51,50,101,98,53,98,55,102,100,57,97,56,97,52,55,52,102,52,98,99,98,57,101,100,57,99,53,100,98,99,102,54,100,100,51,97,51,51,48,50,52,52,56,97,49,57,53,100,56,98,51,53,57,48,100,97,98,56,48,57,101,98,48,50,34,44,34,97,117,116,104,111,114,34,58,110,117,108,108,44,34,99,111,109,109,101,110,116,34,58,110,117,108,108,44,34,105,115,95,99,117,114,114,101,110,116,34,58,116,114,117,101,125]}