{"id":32872883,"url":"https://github.com/tidesdb/tidesdb","last_synced_at":"2026-04-02T15:12:09.350Z","repository":{"id":258023172,"uuid":"872645739","full_name":"tidesdb/tidesdb","owner":"tidesdb","description":"High-performance adaptive, durable, portable, transactional embeddable storage engine with optional tiered object storage for infinite scale. Designed for flash and RAM optimization.","archived":false,"fork":false,"pushed_at":"2026-03-30T06:59:51.000Z","size":9450,"stargazers_count":492,"open_issues_count":1,"forks_count":42,"subscribers_count":8,"default_branch":"master","last_synced_at":"2026-03-30T08:47:04.980Z","etag":null,"topics":["acid","btree","c-library","database","embeddable","linux","lsm-tree","lsmb","macos","multi-platform","object-storage","oltp","portable","storage-engine","transactional","ttl","windows","x86-64"],"latest_commit_sha":null,"homepage":"https://tidesdb.com","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tidesdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":"DCO","cla":"CLA"},"funding":{"custom":["https://tidesdb.com/sponsors/"]}},"created_at":"2024-10-14T20:04:39.000Z","updated_at":"2026-03-27T20:38:02.000Z","dependencies_parsed_at":"2026-02-17T00:01:11.149Z","dependency_job_id":null,"html_url":"https://github.com/tidesdb/tidesdb","commit_stats":null,"previous_names":["tidesdb/tidesdb"],"tags_count":114,"template":false,"template_full_name":null,"purl":"pkg:github/tidesdb/tidesdb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidesdb%2Ftidesdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidesdb%2Ftidesdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidesdb%2Ftidesdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidesdb%2Ftidesdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tidesdb","download_url":"https://codeload.github.com/tidesdb/tidesdb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidesdb%2Ftidesdb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31308727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acid","btree","c-library","database","embeddable","linux","lsm-tree","lsmb","macos","multi-platform","object-storage","oltp","portable","storage-engine","transactional","ttl","windows","x86-64"],"created_at":"2025-11-09T13:01:25.055Z","updated_at":"2026-04-02T15:12:09.340Z","avatar_url":"https://github.com/tidesdb.png","language":"C","readme":"\u003cdiv\u003e\n    \u003ch1 align=\"left\"\u003e\u003cimg width=\"108\" src=\"artwork/tidesdb-logo-v8.png\"\u003e\u003c/h1\u003e\n\u003c/div\u003e\n\nTidesDB is a fast and efficient key value storage engine library written in C. The underlying data structure is based on a log-structured merge-tree (LSM-tree).\n\nIt is not a full-featured database, but rather a library that can be used to build a database atop of or used as a standalone key-value/column store.\n\n[![Linux Build Status](https://github.com/tidesdb/tidesdb/actions/workflows/build_and_test_tidesdb.yml/badge.svg)](https://github.com/tidesdb/tidesdb/actions/workflows/build_and_test_tidesdb.yml)\n\n## Features\n- ACID transactions with MVCC supporting 5 isolation levels: `READ_UNCOMMITTED`, `READ_COMMITTED`, `REPEATABLE_READ`, `SNAPSHOT`, and `SERIALIZABLE`. Serializable isolation uses SSI (Serializable Snapshot Isolation) with read-write conflict detection to prevent all anomalies including write-skew. Transactions support savepoints for partial rollback and read-your-own-writes semantics.\n- Multi-column family transactions with atomic all-or-nothing semantics. Each CF's WAL receives transaction operations with the same global commit sequence number, ensuring atomicity through sequence-based ordering.\n- Column families provide isolated key-value stores with independent configuration (memtable size, compression, bloom filters, compaction parameters). Runtime configuration updates without restart.\n- Bidirectional iterators with heap-based merge-sort across memtables and SSTables. Snapshot isolation ensures consistent iteration during concurrent writes and compactions. Seeking positions at the first key \u003e= the target, enabling prefix-style range scans.\n- Hybrid and adaptive compaction with three modes: full preemptive merge (minimize space amplification), dividing merge (create partition boundaries), and partitioned merge (minimize write amplification). Dynamic Capacity Adaptation (DCA) automatically scales level capacities based on data size. Dynamic level management adds/removes levels on demand.\n- Automatic crash recovery reconstructs memtables from write-ahead log (WAL) files on startup. WAL entries are replayed into skip lists and queued for flush to disk.\n- Optional bloom filters (configurable false positive rate) reduce disk reads for absent keys. Built during SSTable creation and persisted in metadata.\n- Key-value separation (WiscKey-style) with configurable threshold. Small values stored inline in klog, large values in vlog with offset reference. Reduces write amplification during compaction.\n- TTL support for automatic key-value expiration. Expired entries skipped during reads and removed during compaction.\n- Custom comparators with 6 built-in comparators: memcmp, lexicographic, uint64, int64, reverse, case_insensitive. Used consistently across skip lists, SSTables, and compaction.\n- Lock-free block manager using `pread`/`pwrite` for concurrent I/O. Reference-counted blocks with atomic operations. xxHash32 checksums for integrity. Supports up to 4GB blocks with partial reads.\n- Two-tier caching\n  - File handle cache with LRU eviction (default 512 open SSTables). Background reaper closes oldest unused files.\n  - NUMA-aware block cache using partitioned CLOCK eviction. Caches raw klog block bytes with zero-copy API and reference bit protection.\n- Background thread pools for flush and compaction (default 2 threads each). Work queues distribute tasks. Compaction auto-triggers when Level 1 reaches (default 4) files.\n- Three sync modes · `TDB_SYNC_NONE` (OS-managed), `TDB_SYNC_FULL` (fsync every write), `TDB_SYNC_INTERVAL` (periodic sync). Structural operations always enforce durability.\n- Compression support · LZ4,LZ4-FAST, Zstd, Snappy (configurable per column family). Applied to klog and vlog blocks, not WAL.\n- Block indexes for fast seeks. Sample every Nth block (configurable ratio, default 1 = every block) storing prefix boundaries and file positions for binary search.\n- Cross-platform · Linux, macOS, Windows, BSD variants, Solaris/Illumos on x86, ARM, RISC-V, PowerPC (32-bit and 64-bit). Comprehensive platform abstraction layer.\n- File portability · Little-endian serialization throughout. Database files work across any platform/architecture without conversion.\n- Clean C API · Returns `TDB_SUCCESS` (0) on success, negative error codes on failure (`TDB_ERR_MEMORY`, `TDB_ERR_INVALID_ARGS`, `TDB_ERR_NOT_FOUND`, `TDB_ERR_IO`, `TDB_ERR_CORRUPTION`, `TDB_ERR_CONFLICT`, etc.). Configurable debug logging with 6 levels: `TDB_LOG_DEBUG` (most verbose), `TDB_LOG_INFO`, `TDB_LOG_WARN`, `TDB_LOG_ERROR`, `TDB_LOG_FATAL`, and `TDB_LOG_NONE` (disable). Log level set via `tidesdb_config_t` at database open. Timestamped log output to stderr with file/line information.\n- Optional \u003ca href=\"https://github.com/microsoft/mimalloc\"\u003emimalloc\u003c/a\u003e, \u003ca href=\"https://google.github.io/tcmalloc/overview.html\"\u003etcmalloc\u003c/a\u003e, and \u003ca href=\"https://github.com/jemalloc/jemalloc\"\u003ejemalloc\u003c/a\u003e support\n- Optional hybrid B-tree + LSM-tree which can be configured per column family\n- Ability to clone column families\n- Easy pluggable custom allocator support\n- Object store mode with S3-compatible storage, local file caching, and node-failure recovery\n\n## Getting Started\nTo learn more about TidesDB, check out [What is TidesDB?](https://tidesdb.com/getting-started/what-is-tidesdb/)\n\nFor building and benchmarking instructions [Building \u0026 Benchmarking TidesDB](https://tidesdb.com/reference/building/)\n\nFor C usage documentation, see the [TidesDB C Reference](https://tidesdb.com/reference/c/)\n\n## Discord Community\nJoin the [TidesDB Discord Community](https://discord.gg/tWEmjR66cy) to ask questions, work on development, and discuss the future of TidesDB.\n\n## License\nMultiple licenses apply to TidesDB. The primary license is the Mozilla Public License Version 2.0 (TidesDB), while additional licenses apply to the dependencies used in the project.\n\n```\nMozilla Public License Version 2.0 (TidesDB)\n\n-- AND --\nBSD 3 Clause (Snappy)\nBSD 2 (LZ4)\nBSD 2 (xxHash - Yann Collet)\nBSD 2 (inih - Ben Hoyt)\nBSD (Zstandard)\n```","funding_links":["https://tidesdb.com/sponsors/"],"categories":["Database","C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidesdb%2Ftidesdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftidesdb%2Ftidesdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidesdb%2Ftidesdb/lists"}