Commit Graph

66 Commits

Author SHA1 Message Date
Matt Joiner 5f8471e21b Rework storage.TorrentImpl to support shared capacity key 2021-06-07 13:01:39 +10:00
Matt Joiner a60a4c9117 Progress testing without cgo a bit 2021-05-21 15:22:26 +10:00
Matt Joiner b21aebeaae Make wal the default for sqlite resource pieces
Fixes broken test as a result.
2021-05-17 11:56:10 +10:00
Matt Joiner 7798e2a306 Make synchronous=off the default 2021-05-17 11:56:10 +10:00
Matt Joiner c585b84126 Set smarter defaults 2021-05-17 11:56:10 +10:00
Matt Joiner fc0f2d146d Set page size before initializing connections
Setting page_size seems to be ignored if done after setting journal_mode, specifically to WAL I think. There's huge performance benefits to getting it right.
2021-05-17 11:56:10 +10:00
Matt Joiner 961cbfd765 Add CustomDirect BenchmarkMarkComplete sub-test 2021-05-14 15:42:54 +10:00
Matt Joiner 7b3e48b915 Expose SetSynchronous as an option 2021-05-14 15:41:56 +10:00
Matt Joiner 5030804b01 Fix race in MarkNotComplete 2021-05-14 15:41:28 +10:00
Matt Joiner e5d21dbf34 Don't create blobs when reading 2021-05-14 15:41:23 +10:00
Matt Joiner b151514154 Tidy up sqlite direct piece receiver name 2021-05-14 15:40:59 +10:00
Matt Joiner 9feb85d0d1 Remove unused method 2021-05-14 15:40:38 +10:00
Matt Joiner 8dcc52ccf9 Don't set the page size by default 2021-05-06 15:25:01 +10:00
Matt Joiner 96574468c5 Expose a variety of blob cleanup styles 2021-05-06 15:17:31 +10:00
Matt Joiner abe003b6b3 Benchmark different mmap sizes and journal modes 2021-05-06 12:00:20 +10:00
Matt Joiner 20c00dedc0 Rework lots of option handling 2021-05-05 21:36:36 +10:00
Matt Joiner acfe0ba87e Rename new.go 2021-05-05 15:55:08 +10:00
Matt Joiner 745a34b43e Handle expired blobs as they occur 2021-05-05 11:47:39 +10:00
Matt Joiner 675a0ab0dc Rework to use a pool of blobs 2021-05-05 10:02:15 +10:00
Matt Joiner 855144212c Get benchmarks working 2021-05-04 22:56:43 +10:00
Matt Joiner afea28091f Implement sqlite directly without using piece resources 2021-05-04 19:51:42 +10:00
Matt Joiner 0021c2a70c Use BenchmarkMarkComplete for non-sqlite storages too 2021-05-04 12:44:51 +10:00
Matt Joiner f00f513706 Add missing closeMu use in ReadConsecutiveChunks 2021-02-22 16:39:21 +11:00
Matt Joiner 86a2b71c47 Code comment 2021-02-19 12:37:26 +11:00
Matt Joiner 78c77c0b45 Expose mmap_size in sqlite storage, and change default to 8 MiB 2021-02-04 18:29:40 +11:00
Matt Joiner 371d54ab76 Fix Close race in sqlite storage when batch writes disabled 2021-02-03 19:27:26 +11:00
Matt Joiner 6f9c2fed61 Add batch writes cases to sqlite storage benchmarks 2021-02-03 18:55:14 +11:00
Matt Joiner 15ccbc95c6 Fix sqlite storage for numconns 1 2021-02-02 10:41:39 +11:00
Matt Joiner 270a2ba1ae Switch to reading consecutive incomplete chunks
This fixes a race where a sqlite conn isn't reserved for the read part of a MarkComplete operation after the write has already begun.
2021-02-02 10:41:38 +11:00
Matt Joiner fbc9a77cd8 Escape URI path 2021-01-26 21:49:53 +11:00
Matt Joiner 9d6bf7a4f0 Remove cast(data as blob) workaround
Upstream merged the fix. Good performance boost.
2021-01-25 15:54:37 +11:00
Matt Joiner c424a2510e Create index on blob(last_used) 2021-01-25 15:54:37 +11:00
Matt Joiner 3e34763678 Add sqlite-storage-cli 2021-01-25 15:54:37 +11:00
Matt Joiner 5920bcae89 Remove obsolete reference to piece storage opts 2021-01-25 15:54:37 +11:00
Matt Joiner 25c60b72eb Fix race in writes to closed provider 2021-01-25 15:54:37 +11:00
Matt Joiner beb9ec8ffe Fix transfer tests involving sqlite memory storage 2021-01-25 15:54:37 +11:00
Matt Joiner b69bb34eaf Rejig some storage options 2021-01-25 15:54:37 +11:00
Matt Joiner 19f5984aec Include context.Context and pprof label in withConn 2021-01-25 15:54:37 +11:00
Matt Joiner 2ddd3169ef Move storage piece benchmarks to storage/test and add a lot more dials 2021-01-25 15:54:37 +11:00
Matt Joiner cb5f80ec11 Improve configurability and add PutSized to sqlite storage 2021-01-25 15:54:37 +11:00
Matt Joiner 434dfdf6e0 Add MarkComplete benchmark for sqlite 2021-01-25 15:54:37 +11:00
Matt Joiner cb1d6bfc8f Fix boundary conditions trimming sqlite3 storage cache 2021-01-18 14:48:30 +11:00
Matt Joiner 41ef267c1b sqlite storage: Ensure that chunks are consecutive 2020-11-21 13:44:23 +11:00
Matt Joiner 8ef37cb2e6 sqlite storage: Remove num batched write queries log message 2020-11-16 16:37:11 +11:00
Matt Joiner d84367c9a6 Update to race fixes in filecache and sqlite 2020-11-16 16:37:11 +11:00
Matt Joiner 258585fd8b sqlite storage: Buffer write requests 2020-11-16 16:37:11 +11:00
Matt Joiner b0ebc856d9 sqlite storage: Add some expvars 2020-11-16 16:37:11 +11:00
Matt Joiner e65fac26ac sqlite storage: Add error return from withConn 2020-11-16 16:37:11 +11:00
Matt Joiner 7cb74b158f Replace storage.IncompletePieceToWriter with io.Writer
It was incorrect to assume piece hashing only operates on incomplete chunk data. This actually uncovered a bug where duplicate hash checks occurred, and the redundant checks would fail due to not reading the completed data.
2020-11-06 16:23:38 +11:00
Matt Joiner 96b640065a sqlite storage: Add capacity management 2020-11-03 15:17:12 +11:00