Commit Graph

516 Commits

Author SHA1 Message Date
Miroslav Crnic b110a7cb38 cdc: ignore unknown tags 2025-11-12 13:18:53 +00:00
Miroslav Crnic 2d7abe35b4 shard: support wait for state applied req 2025-11-12 09:12:07 +00:00
Miroslav Crnic 2ed670a907 udpSocketPair: spread across sockets better
We were using last 2 bit of time but clock could be low precission.
Hashing the time is better here.
2025-10-27 15:30:16 +00:00
Francesco Mazzoli 02891b6863 Use mimalloc in release and alpine builds
This should make the alpine build usable in production.
2025-10-27 10:20:15 +00:00
Miroslav Crnic f95775e614 shard: metrics as simple counters 2025-10-24 16:57:23 +01:00
Miroslav Crnic d96abd3083 minor fixes 2025-10-16 17:12:37 +00:00
Miroslav Crnic 6bfd89dec7 options: parse -syslog 2025-10-16 14:32:37 +00:00
Francesco Mazzoli c1e3fa9807 Add way to specify ubuntu build image 2025-10-16 14:01:06 +00:00
Miroslav Crnic 924e75674f shard: support multiple reader threads 2025-10-16 12:39:11 +01:00
Miroslav Crnic 8cec8bcf6b kmod: delete files immediately if policy allows 2025-10-15 22:58:58 +01:00
Miroslav Crnic 9cba2856ba SPSC: another MultiWaiter fix
_queuesWithWork can go negative.
Consider the following scenario
there are 2 queues first one has work and
consumer is active.
1. producer adds work to queue 1 and sees it needs
  to update _queuesWithWork but is preempted
2. consumer consumes work from queue 0 and
   decrements _queuesWithWork to 0
3. consumer continues consuming and consumes all
   work from queue 1
4. consumer decrements _queuesWithWork to -1
5. only now producer updates _queuesWithWork to 0

It could be also solved by removeWork returning new value
and then consumer stopping consumption if it is 0.
2025-10-03 10:57:16 +00:00
Francesco Mazzoli 03a2a08ec9 Linux 6.12 2025-10-03 11:08:45 +01:00
Francesco Mazzoli f745f7c8a9 Generalize CRC consumption in block reader 2025-10-01 14:14:44 +01:00
Francesco Mazzoli 7a7a43ff14 Streamline block reads, do CRC more on the fly.
This is in preparation with a deeper refactor of reading from Go
in general. The big difference that we have now which we did not
have before is that we now have CRCs for every single page.
2025-10-01 14:14:44 +01:00
Miroslav Crnic 86fc9fd03b SPSC: fix double close with MultiWaiter 2025-09-30 17:06:22 +01:00
Miroslav Crnic 0d4b7ec885 shard: use multiple SPSC queues
It allows for better prioritization and removes copies from/to wrapper.
2025-09-26 17:46:30 +01:00
Miroslav Crnic 6aac33c62e SPSC: add support for waiting multiple queues 2025-09-26 17:46:30 +01:00
Miroslav Crnic abca852efb bump go version to 1.25 + warnings fix 2025-09-26 11:30:35 +01:00
Francesco Mazzoli d5a45d66b7 Run bincode tests in docker if requested, clean up ci.py
Fixes #41.
2025-09-23 23:50:38 +01:00
Miroslav Crnic 6724f05691 Fixes after static analyser 2025-09-23 12:44:20 +01:00
Miroslav Crnic 1a66e1d2e1 registry: flag for better dynamic port handling
In case of full shutdown/startup and usage of dynamic ports it is
possible replicas get out of date address information.
Since they think there is enough replicas to form a quorum they will
not try to refetch address information immediately but after some delay.
This flag -using-dynamic-ports informs registry to wipe ports on startup
as empty ports are not considered valid addresses replicas will refetch
information quickly.

Note that in case of production rolling restart this is not a problem
as replica information changes slowly.
2025-09-23 11:35:06 +01:00
Miroslav Crnic 239b623e56 registry: add unit tests 2025-09-22 15:14:21 +01:00
Francesco Mazzoli 136d55bff0 Cleanup CRC32C code
Specifically:

* Extend tables so that they won't wrap around wrongly for big sizes
    (we would never hit this since our blocks are at most a few MBs
    big).
* Use CRC instructions to compute remainders.
2025-09-21 22:22:22 +01:00
Francesco Mazzoli 93f1143355 Remove dead code 2025-09-18 21:53:37 +01:00
Francesco Mazzoli 01f9d5addf Improve FUSE, run all tests with it
The FUSE driver, up to now, had no way to know when the user had
"explicitly" closed a file. Instead it linked the TernFS file on
flush, which could cause nasty situation. The classic example
is a fork causing the FD to a TernFS file being present in the forked
process, and then the process dying causing a spurious flush.

This commit adds a way to detect when a flush is due to a close(),
which allows us to link the file only in the cases where that happened,
which is a much better heuristic and close to what we do in the kernel
module.

This commit also contains various other improvements to make all tests
pass under FUSE. The big remaining item is changing how files are read
(they're currently read all upfront and then kept in memory).
2025-09-18 18:09:43 +01:00
Joshua Leahy 7a4e466ac6 Make TernFS open source 2025-09-17 18:20:23 +01:00
Miroslav Crnic 6edd7bdd6a registry 2025-09-17 13:43:42 +01:00
Miroslav Crnic 74d99c92d2 logsdbtests: marked test for disabled functionality as skipped 2025-09-17 10:00:10 +00:00
Miroslav Crnic c29f3191d8 core: common option parsing 2025-09-17 09:07:20 +00:00
Miroslav Crnic 8c75dd0d89 registry: changes to core/messages 2025-09-17 09:07:14 +00:00
Joshua Leahy af58e27615 Reference AES back to Intel's ICP library
That libray was released under Apache 2.0, whereas the PDF unfortunately
does not provide a license allowing for use of its example code.
2025-09-11 13:12:40 +01:00
Joshua Leahy 4d59472fad Remove iostream from Common.hpp (iosfwd should do) 2025-09-11 13:12:40 +01:00
Joshua Leahy 752d9c074a Sink code from XmonAgent.hpp to XmonAgent.cpp 2025-09-11 13:12:40 +01:00
Joshua Leahy 99b56195ec Replace wyhash with something licensable
Unfortunately Lemire's wyhash code was licensed as Apache, we'd rather
have something compatible with GPLv2. This probably a more appropriate
choice anyway.
2025-09-11 13:12:40 +01:00
Joshua Leahy d72f1b494d Make C++ functional tests pass 2025-09-11 13:12:40 +01:00
Miroslav Crnic a4d42be8a4 cdc/shard: fix metrics export 2025-09-09 12:17:17 +00:00
Francesco Mazzoli 4702eca3d5 Label docker images with repository 2025-09-08 10:38:52 +00:00
Miroslav Crnic 92d25d04da shuckle: rename to registry prepare for replace 2025-09-08 08:59:08 +00:00
Joshua Leahy 65712e178a Remove encumbered comments from Int64AddOperator 2025-09-04 15:50:27 +00:00
Francesco Mazzoli 2ccdfd1d44 Factor out go files in more meaningful directories
Since we're going to add licenses soon
2025-09-04 15:07:35 +00:00
Joshua Leahy 05799dc1ed Fix gf_tables.py
The C file has been manually modified and does not match what is
autogenerated, this brings it back into sync.
2025-09-04 12:43:44 +00:00
Francesco Mazzoli ac77d763a3 Limit third-party make concurrency 2025-09-03 23:11:12 +01:00
Francesco Mazzoli 4096e73818 Kill all references to internal services 2025-09-03 10:35:40 +00:00
Francesco Mazzoli 110705db8d EggsFS -> TernFS rename
Things not done because probably disruptive:

* kmod filesystem string
* sysctl/debugfs/trace
* metrics names
* xmon instance names

Some of these might be renamed too, but starting with a relatively
safe set.
2025-09-03 09:29:53 +01:00
Miroslav Crnic dd03ba4614 shard: fix sysmlinks 2025-09-02 11:59:52 +00:00
Miroslav Crnic f3f5b4b0e2 cdc: dont flush on each log entry
We manually control flush of the WAL.
We persist the changes outside the loop by calling flush() with sync.
Since we only send responses after flush we will never send information
about anything that was not persisted.
2025-08-28 08:26:11 +00:00
Francesco Mazzoli 21aa58c4e9 unlikely stuff 2025-08-25 08:43:21 +00:00
Francesco Mazzoli 786073adbf Do not move entries when printing out error message 2025-08-13 10:45:22 +00:00
Francesco Mazzoli 0c25fbb497 Retry on make directory if mtime is too recent 2025-08-13 10:28:22 +00:00
Miroslav Crnic 11ec289606 udpsocket: dont crash on nic flap 2025-08-10 13:59:24 +00:00