8643e0abc5
[ #1668 ] writecache: Use object size to check free space
...
DCO action / DCO (pull_request) Successful in 1m7s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m30s
Build / Build Components (pull_request) Successful in 1m56s
Vulncheck / Vulncheck (pull_request) Successful in 1m47s
Tests and linters / Run gofumpt (pull_request) Successful in 3m16s
Tests and linters / Lint (pull_request) Successful in 3m49s
Tests and linters / Staticcheck (pull_request) Successful in 3m49s
Tests and linters / Tests (pull_request) Successful in 3m59s
Tests and linters / gopls check (pull_request) Successful in 4m9s
Tests and linters / Tests with -race (pull_request) Successful in 4m40s
Pre-commit hooks / Pre-commit (push) Successful in 1m17s
Vulncheck / Vulncheck (push) Successful in 1m24s
Build / Build Components (push) Successful in 1m57s
Tests and linters / Run gofumpt (push) Successful in 2m37s
Tests and linters / Tests (push) Successful in 3m1s
Tests and linters / Staticcheck (push) Successful in 3m7s
Tests and linters / Lint (push) Successful in 3m11s
Tests and linters / gopls check (push) Successful in 3m14s
Tests and linters / Tests with -race (push) Successful in 3m25s
OCI image / Build container images (push) Successful in 4m54s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-03-10 17:52:57 +03:00
fb928616cc
[ #1598 ] golangci: Enable unparam linter
...
DCO action / DCO (pull_request) Successful in 35s
Vulncheck / Vulncheck (pull_request) Successful in 1m6s
Build / Build Components (pull_request) Successful in 1m45s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m44s
Tests and linters / Staticcheck (pull_request) Successful in 1m59s
Tests and linters / gopls check (pull_request) Successful in 2m19s
Tests and linters / Run gofumpt (pull_request) Successful in 2m35s
Tests and linters / Lint (pull_request) Successful in 2m56s
Tests and linters / Tests with -race (pull_request) Successful in 3m48s
Tests and linters / Tests (pull_request) Successful in 3m58s
To drop unnecessary parameters and return values.
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-01-14 09:06:47 +03:00
3b236160a6
[ #1367 ] writecache: Drop DB label from metrics
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-09-12 15:06:33 +03:00
b142b6f48e
[ #1367 ] fstree: Add size to file counter
...
FSTree file counter used by writecache. As writecache has now only one
storage, so it is required to use real object size to get writecache
size more accurate than `count * max_object_size`.
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-09-12 15:06:33 +03:00
5f6c7cbdb1
[ #1367 ] writecache: Drop bbolt DB
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-09-12 14:22:29 +03:00
08b1f18bca
[ #1296 ] writecache: Add count limit
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-08-09 06:30:32 +00:00
8180a0664f
[ #887 ] node: Drop badger writecache implementation
...
Vulncheck / Vulncheck (pull_request) Successful in 6m1s
Build / Build Components (1.21) (pull_request) Successful in 7m37s
Build / Build Components (1.20) (pull_request) Successful in 7m52s
Tests and linters / Staticcheck (pull_request) Successful in 8m56s
Tests and linters / Lint (pull_request) Successful in 9m26s
Tests and linters / Tests (1.21) (pull_request) Successful in 15m5s
Tests and linters / Tests with -race (pull_request) Successful in 15m7s
DCO action / DCO (pull_request) Successful in 1m1s
Tests and linters / Tests (1.20) (pull_request) Successful in 4m1s
Badger implementation isn't tested and works not well,
but requires human resources to maintain.
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-12-22 13:00:54 +03:00
1a0cb0f34a
[ #421 ] Try using badger for the write-cache
...
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
2023-08-07 08:16:57 +00:00
2ce43935f9
[ #312 ] metrics: Add writecache metrcis
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-05-24 10:18:39 +00:00
d212d908b5
[ #312 ] wc: Add metrics
...
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-05-24 10:18:39 +00:00
4b768fd115
[ #381 ] *: Move to sync/atomic
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-05-23 08:18:01 +03:00
Evgenii Stratonikov
bda084f331
[ #1745 ] writecache: Simplify object counters
...
Remove unused option and additional pointers to db/fstree.
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
2022-09-02 11:59:53 +03:00
Pavel Karpy
616013cb8a
[ #933 ] write-cache: Use real number of objects in counters
...
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-10-25 18:49:10 +03:00
Leonard Lyubich
a1696a81b6
[ #776 ] writecache: Limit size of used disk space
...
There is a need to limit disk space used by write-cache. It is almost
impossible to calculate the value exactly. It is proposed to estimate the
size of the cache by the number of objects stored in it.
Track amounts of objects saved in DB and FSTree separately. To do this,
`ObjectCounters` interface is defined. It is generalized to a store of
numbers that can be made persistent (new option `WithObjectCounters`). By
default DB number is calculated as key number in default bucket, and FS
number is set same to DB since it is currently hard to read the actual value
from `FSTree` instance. Each PUT/DELETE operation to DB or FS
increases/decreases corresponding counter. Before each PUT op an overflow
check is performed with the following formula for evaluating the occupied
space: `NumDB * MaxDBSize + NumFS * MaxFSSize`. If next PUT can cause
write-cache overflow, object is written to the main storage.
By default maximum write-cache size is set to 1GB.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-09-15 18:07:36 +03:00