Commit Graph
97 Commits
Author SHA1 Message Date
Carl Johnsen 77f3000e4f Reduced the timing of a block to the lifetime of the block request as it roundtrips from/to the BlockManager 2025-11-10 13:28:59 +01:00
Carl Johnsen 435792c8fa BlockManager now uses times reported by the DeadlockTimer as deadlock detection threshold instead of a hardcoded 5 minutes 2025-10-28 14:42:43 +01:00
Carl Johnsen 91fc698314 The block manager only adds a block to the cache, if it's needed at a later point. 2025-10-03 09:50:08 +02:00
Carl Johnsen 2aa2103f33 Changed BlockManager to only use the cache if the max size is > 0 2025-10-03 09:26:38 +02:00
Carl Johnsen aafe192766 Added docstring 2025-10-03 09:26:08 +02:00
Carl Johnsen dff4b52066 Moved instantiation of the block wrapper to the volume decompressor 2025-10-03 08:32:20 +02:00
Carl Johnsen 2ad6e088ac Added another profiling stopwatch to blockmanager 2025-10-03 08:21:42 +02:00
Carl Johnsen 1f44b5e01b Removed old ack profiling from the block manager 2025-10-03 07:49:06 +02:00
Carl Johnsen d03259d687 Redacted the ack channel in the restore process network in favor of a referenced counted volume wrapper that'll dispose the reader and tempfile once safe. 2025-10-02 21:40:40 +02:00
Carl Johnsen 4f2bfe1fa0 Reduced very verbose logging on errors in BlockManager 2025-10-02 21:35:35 +02:00
Carl Johnsen 4951500db4 The BlockManager wouldn't always correctly retire its request channel 2025-10-02 21:34:44 +02:00
Carl Johnsen 91f783f80f Handled compact being called multiple times due to eventual consistency of the cache count. 2025-10-02 16:53:30 +02:00
Carl Johnsen 12e5383f2f Instead of exploiting the garbage collector to return the arrays from the pool, we use an internal reference counter for each datablock 2025-10-02 16:21:03 +02:00
Carl Johnsen b475eeb387 Moved formatting of the explicit log messages to occur later to alleviate having to do that when that log level is disabled, which should decrease wasted processing. 2025-09-30 21:38:04 +02:00
Carl Johnsen 36ce099e6d Added additional toggle-able debug prints to the restore flow 2025-09-30 21:18:28 +02:00
Carl Johnsen 531471e3b5 Reordered the final checks in the SleepableDictionary and lifted some warnings to errors. 2025-09-30 13:06:20 +02:00
Carl Johnsen 638b725e82 MemoryCache callback wasn't attached to the entries properly 2025-09-30 12:59:34 +02:00
Carl Johnsen f3f2d93a6e Renamed internal variable to reflect it's a private variable 2025-09-30 12:59:15 +02:00
Carl Johnsen 3b9f0c04a0 MemoryCache.Count is expensive and is used for diagnostics.
Instead we keep our own counter to check for when to compact the cache.
2025-09-30 12:58:39 +02:00
Carl Johnsen 4826b800a5 Instead of keeping track of how many that are actively accessing the arrays, we now have an object wrapping the array.
When this object is collected by the garbage collector, the array is returned to the array pool. This moves the responsibility to the garbage collector leading to a more thread-safe approach with less locks, at the cost of potentially using memory for a longer time until the garbage collector picks up the objects.
2025-09-30 12:55:13 +02:00
Carl Johnsen e90013f41f Added and handled nullable to all of the restore processes 2025-09-30 12:46:08 +02:00
Carl Johnsen 1a7321556e Changed the decompression ack channel type to long 2025-08-10 20:59:33 +02:00
Carl Johnsen dfc92c71b1 Added more rendevouz points to allow for aborting during deadlocks 2025-08-10 20:54:13 +02:00
Carl Johnsen f85727bf3a Added explicit debug printing 2025-08-10 20:34:26 +02:00
Carl Johnsen 149c22a9b8 Added the new timer in the volume consumer to the profiling output. 2025-08-08 14:10:04 +02:00
Carl Johnsen 0f950b2102 Updated BlockManager.VolumeConsumer and VolumeManager to ack the decompression requests.
Also made VolumeManager keep track of which volumes are safe to dispose.
2025-08-08 12:41:17 +02:00
Carl Johnsen 44c8793eaa Changed the cache evict flag in BlockRequest to be an enum, as there are now more than 2 types of block request 2025-08-08 12:38:08 +02:00
Carl Johnsen 8c9f129b8a Removed unused parameter 2025-06-24 12:04:49 +02:00
Carl Johnsen 31c5441bdb Forwarded cancellation tokens, added some missing .ConfigureAwait() and added some missing docstrings 2025-06-19 11:04:09 +02:00
Carl Johnsen baab370046 Added the final docstrings 2025-06-18 08:26:20 +02:00
Carl Johnsen 3d11a05400 Added .ConfigureAwait(false) to all of the await statements 2025-06-12 08:34:29 +02:00
Carl Johnsen 217ac39e0f Changed the constructor of restore's BlockManager.SleepableDictionary to use factory-like async construction to make the database accesses async 2025-06-12 07:13:59 +02:00
Carl Johnsen bd493638af Merge branch 'master' into performance/mssqlite-async 2025-06-02 10:39:33 +02:00
Kenneth Skovhede f592029c3d Fixed rare deadlock on restore failure 2025-05-28 14:35:00 +02:00
Carl Johnsen 85c645c7f1 Updated the internal processes of the reworked restore flow to use the new async database methods 2025-05-21 15:29:13 +02:00
Carl Johnsen ebb04ddd08 Made waking up a waiting block request on the BlockManagers cache async to lower time spent by the volume consumer task 2025-03-11 14:23:37 +01:00
Carl Johnsen b61d594180 Added higher resolution internal profiling timers for the BlockManager 2025-03-11 14:22:49 +01:00
Kenneth Skovhede 6f7f2757a9 Rewrote timeout monitoring 2025-03-10 10:22:34 +01:00
Carl Johnsen 83dc334069 Improve error handling in restore operations by retiring inputs and outputs on exceptions 2025-03-10 05:44:31 +01:00
Carl Johnsen 63464342cd Changed the request timeout to issue a warning, rather than an error 2025-03-09 08:16:10 +01:00
Carl Johnsen 60fa777a8e Added a timeout for block requests 2025-03-03 17:34:27 +01:00
Carl Johnsen 1650399fe6 Added explicit logging to trace a block request through the new restore network 2025-03-03 17:33:20 +01:00
Carl Johnsen 96149bbcf3 The MemoryCache in BlockManager cannot be null any more. 2025-03-03 17:09:46 +01:00
Carl Johnsen 0ea45b0023 Rather than sleeping on the active readers spinlock, the post-eviction callback should yield to whichever other thread is trying to take the lock. 2025-03-03 17:09:20 +01:00
Carl Johnsen 805ad42472 The MemoryCache in the BlockManager was removing its own entry in its post-eviction callback 2025-03-03 17:08:36 +01:00
Carl Johnsen dbe413d889 Fixed the restore BlockManager block counting logic 2025-02-28 10:26:07 +01:00
Carl Johnsen 2ebb021174 Cleaned up BlockManager 2025-02-27 14:40:29 +01:00
Carl Johnsen 2fae2d510e Removed old block counters from BlockManager 2025-02-27 14:16:06 +01:00
Carl Johnsen 038e78ad06 The block cache is now always present, as it keeps track of blocks. In case of a cache size 0, every Set() will trigger an evict. 2025-02-27 11:17:11 +01:00
Carl Johnsen bdfdc7e92a MemoryCache evict now correctly handles the ArrayPool 2025-02-27 10:54:47 +01:00