Documentation Index
Fetch the complete documentation index at: https://mintlify.com/questdb/questdb/llms.txt
Use this file to discover all available pages before exploring further.
Overview
QuestDB is a production-grade time-series database serving critical use cases. All contributions must meet high standards for quality and reliability. This guide covers the contribution process, quality expectations, and development workflows.License and Conduct
By contributing to QuestDB, you agree that your contributions will be licensed under the Apache License 2.0. No CLA or DCO signature is required. Please review the Code of Conduct before participating.Quality Standards
QuestDB maintainers enforce strict quality standards:Core Requirements
- Exhaustive testing required — every contribution must include comprehensive tests
- Problem-focused changes only — contributions must solve a real problem; superficial changes (spelling fixes in comments, whitespace adjustments, stylistic tweaks) are not accepted
- Minimize change surface area — keep changes focused and minimal to reduce risk
- Additive and non-breaking — make every effort to avoid breaking existing behavior; if a breaking change is truly unavoidable, join Slack to discuss it before starting implementation
- No architectural changes without discussion — large-scale or structural changes must be discussed in an issue before implementation begins
High-Risk Contributions
Changes that affect core data paths, storage formats, or wire protocols are considered high-risk. These require prior discussion and approval from maintainers before any code is written.Environment Setup
See Building from Source for detailed instructions on setting up your development environment.Prerequisites
- Operating system: x86-64 or ARM64 (Windows, Linux, FreeBSD, macOS)
- Java 17 64-bit (strict requirement — no earlier, no later)
- Maven 3 (latest version recommended)
- C compiler, CMake — for C library contributions (optional)
Setting up JAVA_HOME
JAVA_HOME is required by Maven:
JAVA_HOME points to the root of the Java directory (e.g., C:\Users\me\dev\jdk-17), not the bin subdirectory.
Code Formatting
Code is formatted using configuration files in the.idea directory. All contributed code should be formatted before submitting a PR.
In IntelliJ IDEA:
- Open File | Settings
- Choose Tools | Actions on Save
- Select Reformat and Rearrange Code
- Click Apply
Coding Guidelines
Java Conventions
Java class members are grouped by kind (static vs. instance) and visibility, and sorted alphabetically. When adding new methods or fields, insert them in the correct alphabetical position among existing members of the same kind. Use modern Java features:- Enhanced switch
- Multiline string literals
- Pattern variables in instanceof checks
is... or has... prefix for boolean variables, fields, and methods.
NULL handling: Always consider NULL behavior when dealing with column data, expression results, and SQL statements. Distinguish NULL as a sentinel value (“not initialized yet”) vs. an actual NULL value.
Zero-GC Requirements
QuestDB is zero-GC along critical paths. Contributions must not allocate on hot paths:- No allocations on critical paths — query execution and data ingestion must not trigger garbage collection
- No string concatenation — use
StringSinkinstead of+orStringBuilder - No string creation — work with
CharSequence,Utf8Sequence, or direct memory - Safe object reuse and pooling — reuse objects rather than creating new ones; use existing pool implementations
- No throwing new exceptions — use pre-allocated exception instances or error codes on hot paths
- Use QuestDB collections — avoid JDK collections (
ArrayList,HashMap); use QuestDB’s internal implementations (ObjList,CharSequenceIntHashMap) - Watch out for lambdas — lambdas can allocate; cache them if you must use them
Dependencies
QuestDB does not have third-party Java dependencies. Rather than using libraries, algorithms are implemented from first principles to ensure a perfect fit with existing code. Contributions must not add third-party dependencies.Testing
See Testing for detailed testing guidelines and conventions.Running Tests
Test Requirements
- Write all tests using
assertMemoryLeak()(except narrow unit tests that provably don’t allocate native memory) - Resource leaks are a pain point — think carefully about all code paths, especially error paths
- Test correct resource cleanup on each path
Performance Testing
For changes that may impact performance:- Benchmark before and after your changes
- Use row generator functions to create large datasets
- Include data volume and performance figures (before/after) in your PR description
Git & PR Conventions
Commit Messages
Use Conventional Commits for commit messages:PR Title Format
PR titles must follow Conventional Commits format:type(scope): description
- Examples:
fix(sql): fix DECIMAL comparison,feat(core): add WAL support - The description is copied to release notes, so it must read well on its own
- Repeat the verb (e.g.,
fix(sql): fix ...notfix(sql): DECIMAL comparison ...) - Speak to the end-user about positive impact, not internal implementation details
PR Description Requirements
Before opening a PR, ensure:- Code is formatted as per the repo’s settings
- Tests pass locally; add/adjust tests for your changes
- No new third-party dependencies
- Commit messages follow Conventional Commits
- PR description includes:
- Link to the relevant issue
- Clear explanation of why the change is needed
- Technical rationale and approach taken
- For performance-related changes: before/after benchmarks with data volumes
PR Labels
Always add GitHub labels consistent with the PR title. Common labels:Bug, CI, Compatibility, Core, Documentation, Enhancement, Flaky Test, ILP, Materialized View, New feature, Performance, Postgres Wire, REST API, SQL, Security, UI, WAL, Windows, regression, rust, storage.
Writing Style
Use active voice in commit messages, PR descriptions, and code comments. Name the acting subject — a class, method, caller, or component. Good:- “
determineExportMode()inspects the compiled factory” - “
setUp()pre-computes per-column metadata into flat arrays” - “The ring queue passes the factory to the exporter”
- “The export mode is determined by inspecting the compiled factory”
- “Per-column metadata are pre-computed into flat arrays at setup time”
- “The factory is passed through the ring queue to the exporter”
Branching
- External contributors: contribute from forks of the repository
- Internal contributors (QuestDB team): prefix branch names with initials (e.g.,
jd/fix-parser-bug)
Pull Request Process
- Reviews begin once the PR is marked ready and CI passes
- Monitor your PR — we will not always remind you to check CI status
- PRs open for more than 2 weeks with failing CI will be closed
- Massive PRs from first-time contributors will be rejected — start with smaller, focused contributions
Common Issues
UI returns 404 on localhost:9000
The web console artifacts are not present. Run:Tests fail on Windows
Antivirus software may cause tests to fail. Typical indicators:- Tests pass on CI but fail locally
- HTTP chunk size assertion failures (missing initial zeroes)
- Test timeouts
- JVM crashes
- Disable “application protocol content filtering”, or
- Add
127.0.0.1to “Excluded IP addresses” in advanced settings
Finding Issues to Work On
Search for issues labeled: Before claiming an issue, ensure you understand the quality standards and can meet the requirements.Getting Help
- Join the Slack community for questions and discussions
- Open an issue for bug reports or feature requests
- For security bugs, see SECURITY.md