메뉴
HN
Hacker News • 25일 전

DoltLite, SQLite에 Git 스타일 버전 관리를 담아 베타 출시

IMP
7/10
핵심 요약

DoltLite는 SQLite를 포크해 B-tree 계층을 Prolly Tree 기반 버전 관리 저장 엔진으로 교체한 임베디드 데이터베이스로, 브랜치·머지·diff는 물론 Git 스타일의 push/pull/clone/fetch 동기화까지 지원합니다. 특히 이 프로젝트는 약 2,000건의 에이전트 PR로 구축되어 AI 코딩 에이전트 팀이 실제 제품급 소프트웨어를 만들 수 있음을 보여준 사례라는 점에서 주목받습니다.

번역된 본문

내 아기가 자라고 있다. 출시 5개월 만에 DoltLite가 버전 0.50.0으로 베타에 도달했다.

DoltLite는 원래 가벼운 시작이었다. Steve Yegge의 혁신적인 에이전트 오케스트레이터인 Gas Town을 테스트할 애착 프로젝트가 필요했다. 장난감이 아닌 실제 문제를 원했다. 우리는 수년간 Dolt의 임베디드 버전을 원했지만 Dolt의 저장 엔진을 C나 Rust로 다시 작성하는 것은 감당하기 어려운 일이었다. SQLite가 그 엔진의 논리적인 호스트로 보였다. 에이전트 팀이 해낼 수 있을까? 약 2,000개의 풀 리퀘스트가 걸렸지만 DoltLite의 베타 전환은 에이전트 팀이 확실히 해낼 수 있음을 증명했다. 이 글은 DoltLite가 무엇이고 베타 출시가 무엇을 의미하는지 설명한다.

DoltLite란 무엇인가

DoltLite는 SQLite의 포크다. B-tree 계층 위의 모든 것은 동일하다. 즉 SQL 파서와 분석기, 파일 시스템 인터랙션 계층, 테스트 하네스는 순정 SQLite다. 다른 Dolt 제품에서는 버전 관리되는 저장소 위에 SQL 엔진을 직접 구현해야 했다. SQL 엔진 구축은 어렵다. DoltLite에서는 C로 버전 관리 저장 엔진을 작성하는 비용만으로 SQL 엔진 하나를 얻었다.

B-tree 계층은 단일 파일 청크 스토어로 백업되는 Prolly Tree로 교체되었다. Prolly Tree는 콘텐츠 주소화된 B-tree다. 이 마법 같은 데이터 구조가 모든 Dolt 제품의 버전 관리 기능을 담당한다. 즉 SQLite 패키지 안에서 Dolt와 Git의 모든 버전 관리 기능을 얻게 된다. SQLite에서 브랜치, 머지, diff를 하고 싶었던 적이 있는가? DoltLite가 정답이다. 아니면 더 중요하게, Git 스타일의 push, pull, clone, fetch로 구동되는 충돌 인식형 SQLite 동기화 엔진을 원했는가? DoltLite가 정답이다. DoltHub를 동기화 백엔드로 사용할 수도 있다.

베타는 무엇을 의미하나

DoltLite의 베타 전환은 네 가지를 의미한다: 저장 포맷 안정성, SQL 호환성, 완전한 버전 관리, 프로덕션 성능.

현장에서 들려오는 기능과 안정성에 대한 보고는 모두 긍정적이다. SQLite의 테스트 스위트는 정말 인상적이다. DoltLite는 그 테스트들과 자체 Dolt 오라클 테스트 스위트를 모두 통과한다. DoltLite는 이제 사용해 볼 준비가 되었다.

저장 포맷 안정성

DoltLite 개발 과정에서 가장 큰 불만은 저장 포맷 변경이었다. 저장 포맷 변경은 하위 호환되지 않아 사용자가 같은 버전에 머물거나 데이터베이스를 수동으로 덤프하고 재가져와야 했다. 베타에 도달하기까지 12번의 포맷 변경이 있었다. 현재 포맷으로는 57개 릴리스, 즉 3개월 이상을 유지 중이다. 이 포맷은 계속 유지할 수 있을 것으로 보인다. 저장 포맷은 이제 안정적이다. 향후 호환성을 깨는 변경이 있더라도 지원되는 마이그레이션 경로를 제공할 것이다. DoltLite 베타는 저장 포맷 파괴적 변경을 걱정하지 않고 도입할 수 있음을 의미한다.

SQL 호환성

SQLite의 SQL 계층은 극도로 잘 테스트되어 있다. DoltLite는 이 테스트의 대부분도 통과하며 SQL 호환성을 증명했다. DoltLite는 580만 개의 복잡한 쿼리로 구성된 스위트인 sqllogictest를 100% 통과했다. 쿼리 계층이 SQLite와 동일하므로 예상된 결과다. SQLite는 SQLite API의 더 넓은 영역을 테스트하는 892,277개의 TCL 기반 인수 테스트도 제공한다. DoltLite는 알려진 4,809개의 차이점을 제외하고 99.46%를 통과했다. 각 차이점에는 이유가 명시되어야 한다. 주요 이유는 다음과 같다:

  • 버전 관리 기능을 지원하기 위해 테이블이 rowid 대신 기본 키로 키가 지정된다. 일부 테스트는 rowid를 직접 검사한다.
  • DoltLite에는 페이지가 아닌 청크가 있다. 일부 테스트는 페이지를 직접 검사한다.
  • WAL이나 저널 사이드카가 없다. WAL 및 저널 테스트는 건너뛴다.

SQLite 사용자는 DoltLite에서 바로 집에 온 것 같은 느낌을 받을 것이다. DoltLite는 추가 버전 관리 기능이 있는 SQLite처럼 동작한다.

완전한 버전 관리

DoltLite는 Dolt의 Git 스타일 버전 관리 핵심 기능을 구현한다. 로컬 버전 관리 기능이 지원된다. 브랜치, 머지, diff, 리베이스, 체리픽, 리셋 등이 그 예시다. 원격 버전 관리도 지원된다: 커스텀 리모트 또는 DoltHub에서 push, pull, clone, fetch가 가능하다. 에이전트 모드를 갖춘 완전한 Dolt Workbench GUI도 제공한다. 새로운 시대를 열어보라.

원문 보기
원문 보기 (영어)
My baby is growing up. Just five months after launch , DoltLite is Beta, version 0.50.0 . DoltLite started as a lark. I needed a pet project to test with Steve Yegge ’s innovative agent orchestrator, Gas Town . I wanted a real problem, not a toy. We wanted an embedded version of Dolt for years but rewriting Dolt’s storage engine in C or Rust was a bridge too far. SQLite seemed like a logical host for that engine. Could a team of agents pull it off? It only took about 2,000 pull requests but DoltLite going Beta proves a team of agents certainly could. This article explains what DoltLite is and what a Beta launch means. What Is DoltLite # DoltLite is a fork of SQLite. Everything above the B-tree layer is the same. That means the SQL parser and analyzer, the file system interaction layer, and test harness are stock SQLite. With other Dolt products we had to implement a SQL engine on top of version-controlled storage. Building a SQL engine is hard. With DoltLite we got one for the cost of writing a version-controlled storage engine in C. The B-tree layer is swapped out for a Prolly Tree backed by a single file chunk store. Prolly Trees are content-addressed B-trees. This magical data structure powers the version control functionality in all Dolt products. That means you get all the version control features of Dolt and Git in a SQLite package. Have you ever wanted to branch, merge, and diff SQLite? DoltLite is for you. Or maybe even more importantly, have you ever wanted a conflict aware SQLite sync engine powered by Git-style push, pull, clone, and fetch? DoltLite is for you. You can even use DoltHub as your sync backend . What Does Beta Mean? # So what does DoltLite going Beta mean for you? Beta means four things: Storage Format Stability SQL Compatibility Full Version Control Production Performance Reports from the field on functionality and stability are universally positive. SQLite’s testing battery is truly impressive. DoltLite passes those tests as well as a custom suite of Dolt oracle tests. DoltLite is ready for you to try. Storage Format Stability # The biggest complaint about the development process for DoltLite was the storage format bumps. Storage format changes were not backward-compatible, requiring users to stay on the same version or manually dump and reimport their databases. It took 12 format changes to get to Beta. We’ve been on the current format for 57 releases, or over three months of calendar time. This format seems like one we can stick with. The storage format is now stable. Any future breaking changes will have a supported migration path. DoltLite Beta means you can adopt without fear of a breaking storage format change. SQL Compatibility # SQLite’s SQL layer is extremely well tested. DoltLite passes the vast majority of these tests as well, proving SQL compatibility. DoltLite passes 100% of sqllogictest , a suite of 5.8M complex queries. The query layer is the same as SQLite so this is expected. SQLite also ships with a suite of 892,277 TCL-based acceptance tests that test a broader surface of the SQLite API. DoltLite passes 99.46% with 4,809 known divergences. Each divergence must have a listed reason. The top reasons are: Tables are keyed by primary key, instead of rowid , to support version control functionality. Some tests directly inspect rowid . DoltLite has chunks, not pages. Some tests directly inspect pages. There is no WAL or journal sidecar. WAL and journal tests are skipped. SQLite users will feel right at home with DoltLite. DoltLite operates like SQLite with extra version control functions. Full Version Control # DoltLite implements the core suite of Dolt’s Git-style version control features. Local version control features are supported. Branches, merges, diffs, rebases, cherry-picks, and resets, to name a few. Remote version control is supported: push, pull, clone, and fetch from a custom remote or DoltHub . You even have the full Dolt Workbench GUI complete with agent mode. Unleash an agent on your SQLite and use dolt_reset('--hard') if it screws something up. Production Performance # DoltLite gives you microsecond-scale embedded database performance but with a version control write performance tax . Reads are close to parity. Each night, a performance report comparing DoltLite to SQLite on a standard sysbench -style benchmark is published on GitHub . Last night’s report shows in-memory DoltLite databases 10% slower on reads and 60% slower on writes. File-backed databases are at parity on reads and 10% slower on batched writes. The big outlier is small autocommit writes which are 3.1X slower than SQLite. Performance sensitive DoltLite workflows should leverage batched writes as much as possible. Even for autocommit writes, we’re talking microsecond (i.e. sub-millisecond) individual write performance: ~125 microseconds in SQLite vs ~400 microseconds in DoltLite on a tiny GitHub runner. Conclusion # DoltLite is Beta! All we’re waiting for now is users. Try DoltLite today for your embedded Dolt use cases. If you need any help, come by our Discord . Meet me in the #doltlite🪶 channel. Blog