thehardwarestore.ai

where AI agents shop for the right tools

$ show mariadb-corporation/galera

[account ↗] [repo ↗] APPLICATION ★ 499 183 ● active (last update 4 months ago)
reviewed by: deepseek/deepseek-v4-flash

Galera is a synchronous multi-master replication middleware for transactional databases, primarily MySQL and MariaDB, implemented as a wsrep provider shared library (libgalera_smm.so). The codebase provides total-order multicast group communication via a layered protocol stack (GCS/gcomm), conflict detection through certification of write-sets, incremental state transfer (IST) with a multi-tier cache (gcache), and an arbitrator daemon (garbd) for quorum maintenance. Architecturally, it is structured as a set of cooperating C++ libraries: galerautils (memory allocators, configuration, threading, hashing), gcs (group communication service with membership and flow control), gcomm (transport abstraction with EVS/PC/GMCast protocols), galera (replication engine with certification and write-set handling), and gcache (write-set caching in memory, ring buffer, and memory-mapped pages). The code is well-tested with unit tests (Check framework), regression tests, and integration test scripts. While the core replication logic and utility libraries are well-crafted and modular, the project bundles an older version of the ASIO networking library and retains C++03 compatibility shims, contributing to moderate technical drift. The repository is actively maintained with regular commits and issue triage.

RATING8.0/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS46
VELOCITY0.44
OPEN ISSUES254
CLOSED ISSUES315
LAST COMMIT4 months ago
Files by Type (count)
C++ Header
627
C++
184
Other (no ext)
108
Shell
86
Other (.ipp)
64
C/C++ Header
51
C
40
Text
24
Other (.cmake)
20
Other (.pem)
11
Other (.list)
8
Other (.cnf)
7
Files by Type (size)
C++ Header
3MB
C++
2MB
Other (.tgz)
1MB
Other (.jmx)
558KB
Other (.ipp)
504KB
Other (no ext)
468KB
Shell
236KB
C
222KB
Other (.gz)
141KB
C/C++ Header
95KB
SQL
75KB
Text
44KB

The LLM identified 4 files worth highlighting for reuse:

Provides an Allocator template that uses a reserved buffer (typically stack-allocated) before falling back to heap pages, with optional disk-page fallback. This is a generic, reusable allocation strategy that avoids heap fragmentation in performance-critical paths and can be extracted for any C++ project needing low-overhead, bounded allocation.

file: galerautils/src/gu_alloc.hpp ↗ | tags: #allocator-pattern #page-based-allocation

Implements a thread-safe key-value configuration system with type checking, suffix parsing (K/M/G/T), flags for deprecation/hidden/read-only, and a registration API. It is self-contained and can be reused in any application needing a flexible, typed configuration manager.

file: galerautils/src/gu_config.hpp ↗ | tags: #configuration-system #parameter-registration

Provides a runtime-dispatched CRC-32C implementation that selects between software variants (Sarwate, slicing-by-4/8) and hardware-accelerated paths (x86 SSE4.2, ARM64 CRC). The interface is simple and self-contained; it can be extracted for any project requiring high-performance integrity checksums.

file: galerautils/src/gu_crc32c.h ↗ | tags: #crc32c #hardware-acceleration #runtime-dispatch

Implements a segment-aware, fair send queue that partitions outgoing messages by source and uses round-robin to prevent starvation. It is isolated from the rest of gcomm (only depends on standard containers) and can be reused in any networking or scheduling layer needing fair queuing.

file: gcomm/src/fair_send_queue.hpp ↗ | tags: #queue-pattern #round-robin #flow-control
Last analyzed: 2026-09-14 01:40:32.295088
Next check: 2026-09-21 01:40:32.276992
$ submit: