Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
316 commits
Select commit Hold shift + click to select a range
c4e494a
move slt files to an slt folder
tonyalaribe Aug 12, 2025
6dd9b95
nitpick. database.rs
tonyalaribe Aug 13, 2025
b5b4272
compiling and working latest version
tonyalaribe Aug 13, 2025
40292a4
ready to reenable in production
tonyalaribe Aug 13, 2025
571bd7b
set datafusion-postgres
tonyalaribe Aug 14, 2025
8a82f54
add recursion limit
tonyalaribe Aug 14, 2025
71bbee5
increase recursion limit
tonyalaribe Aug 14, 2025
32e4db5
update docker file to latest stable
tonyalaribe Aug 14, 2025
84d2501
better queue batch size limits
tonyalaribe Aug 14, 2025
5f4d912
remove array_eelemnt function since its not needed
tonyalaribe Aug 14, 2025
7528351
dbeug cache hits and misses
tonyalaribe Aug 15, 2025
89ec093
support controlling datafusion memory limits
tonyalaribe Aug 15, 2025
0ff2a1b
per connection transaction state in datafusion-postgres pr
tonyalaribe Aug 17, 2025
f14ace5
update readme to better explain the project
tonyalaribe Aug 17, 2025
9557bfb
add socket_id in the unique transaction identifier
tonyalaribe Aug 17, 2025
235a839
configure the engine differently
tonyalaribe Aug 18, 2025
cbff33b
adjust summary field to be a proper array
tonyalaribe Aug 19, 2025
1ee0c5f
checkpoint
tonyalaribe Aug 19, 2025
8db4ea9
have a light compaction cycle
tonyalaribe Aug 19, 2025
f4aa919
update logs
tonyalaribe Aug 19, 2025
1824127
run light optimize every 5 mins but with 16mb targets, and main optim…
tonyalaribe Aug 20, 2025
9398949
default to 3 as compression ration
tonyalaribe Aug 20, 2025
8391396
statistics should use default
tonyalaribe Aug 20, 2025
a908dbd
update queries in README
tonyalaribe Sep 2, 2025
333d523
Update to datafusion 49
tonyalaribe Sep 2, 2025
e7a3c8e
upgrade to datafusion 0.50
tonyalaribe Oct 2, 2025
1a6f8b8
setup otel tracing for datafusion
tonyalaribe Oct 2, 2025
27f3169
add update and delete tests
tonyalaribe Oct 3, 2025
fc5de67
instrument the s3 otel layers
tonyalaribe Oct 3, 2025
1f817e2
telemetry intialization
tonyalaribe Oct 3, 2025
d8e8ebf
query update
tonyalaribe Oct 3, 2025
34cd8fd
update foyer
tonyalaribe Oct 3, 2025
3ed78f3
upgrade bincode and lru
tonyalaribe Oct 3, 2025
aab1e29
wrap the pgwire handlers
tonyalaribe Oct 4, 2025
6edd157
checkpoint
tonyalaribe Oct 4, 2025
be80e47
add update support to query planner. TODO: translate it to delta-rs o…
tonyalaribe Oct 4, 2025
9d1ff8a
checkpoint execute update queries.
tonyalaribe Oct 4, 2025
0cc1ef2
fix tests for update queries
tonyalaribe Oct 4, 2025
3a50334
support for delete queries
tonyalaribe Oct 4, 2025
8e0ac8c
refactor and succinctify codebase dml features
tonyalaribe Oct 4, 2025
1851850
refactor and succinctify codebase dml features
tonyalaribe Oct 4, 2025
d4de082
refactor
tonyalaribe Oct 4, 2025
cf90ce9
refactor
tonyalaribe Oct 4, 2025
1751eec
Merge pull request #8 from monoscope-tech/update-query-support
tonyalaribe Oct 4, 2025
aedd5db
telemetry chaining
tonyalaribe Oct 4, 2025
5a4b3e8
imporve span propagation
tonyalaribe Oct 4, 2025
2ea08ed
dont log sensitive query details
tonyalaribe Oct 4, 2025
09ebef5
update schema
tonyalaribe Oct 4, 2025
d043d1c
map our column reps to deltalake reps
tonyalaribe Oct 4, 2025
5f00ec1
improve the to_json column to render list arrays as valid json
tonyalaribe Oct 4, 2025
fbabf73
increase batch processor limit
tonyalaribe Oct 5, 2025
7bc2946
map schema for inserts
tonyalaribe Oct 5, 2025
bef05e6
remove schema enforcing logic
tonyalaribe Oct 5, 2025
50d8d4b
reduce otel batch sizes
tonyalaribe Oct 5, 2025
e7afdba
fix issues in the schema
tonyalaribe Oct 5, 2025
d634fb3
"Claude PR Assistant workflow"
tonyalaribe Dec 15, 2025
a5a4784
"Claude Code Review workflow"
tonyalaribe Dec 15, 2025
6541ac3
Merge pull request #9 from monoscope-tech/add-claude-github-actions-1…
tonyalaribe Dec 15, 2025
3c8127f
cargo fmt
tonyalaribe Dec 23, 2025
7ea6099
Align dependency versions with deltalake to fix build errors
tonyalaribe Dec 22, 2025
d5eb1b9
Update to latest delta-rs with datafusion 51 and arrow 57
tonyalaribe Dec 22, 2025
a8aa0c4
Add sorting columns metadata and improve Z-order optimization
tonyalaribe Dec 22, 2025
428ff57
Add CI workflow with tests, clippy, and format checks
tonyalaribe Dec 22, 2025
7a8a097
Fix clippy warnings and switch to stable toolchain
tonyalaribe Dec 23, 2025
7a0d253
Add .DS_Store to gitignore and remove from tracking
tonyalaribe Dec 23, 2025
d0896a6
cargo fmt
tonyalaribe Dec 23, 2025
3b79f20
Fix CI workflow to use stable toolchain
tonyalaribe Dec 23, 2025
a6b14cb
Fix CI minio image, improve error handling, add delta-rs API tests
tonyalaribe Dec 23, 2025
7b06d4c
remove pg_catalog for now
tonyalaribe Dec 23, 2025
621b97f
Skip setting sorting columns when list is empty
tonyalaribe Dec 23, 2025
c6da83d
Fix clippy let-and-return warning
tonyalaribe Dec 23, 2025
4c9062f
fix nitpick
tonyalaribe Dec 23, 2025
d8b22a6
Free disk space in CI before test build
tonyalaribe Dec 23, 2025
c346588
Remove docker prune to avoid re-downloading images
tonyalaribe Dec 23, 2025
dd86543
Add timeout protection to tests and mark slow integration tests as ig…
tonyalaribe Dec 24, 2025
382c721
Add CI job for integration tests and fix concurrent test
tonyalaribe Dec 24, 2025
a90cae1
Simplify CI to run all tests in single job
tonyalaribe Dec 24, 2025
a0c32f6
format
tonyalaribe Dec 24, 2025
b7ada4b
Merge pull request #10 from monoscope-tech/upgrade-datafusion
tonyalaribe Dec 24, 2025
1819790
Use GitHub Actions service for MinIO in CI
tonyalaribe Dec 26, 2025
3d9dc30
Fix integration tests hanging on Delta table creation
tonyalaribe Dec 26, 2025
ecf752c
Fix CI: use bitnami/minio:2024 instead of removed latest tag
tonyalaribe Dec 27, 2025
b25377d
Switch to official minio/minio image
tonyalaribe Dec 27, 2025
74541dd
Use bitnami/minio from Amazon ECR Public Gallery
tonyalaribe Dec 27, 2025
5ac05fe
Fix SQLLogicTest failures and improve UDF flexibility
tonyalaribe Dec 27, 2025
0f9a293
Fix formatting
tonyalaribe Dec 27, 2025
4e7492b
Fix clippy: use deref instead of clone on Copy type
tonyalaribe Dec 27, 2025
71c3931
Update json_functions.slt expected output for parsed JSON
tonyalaribe Dec 27, 2025
c430703
Fix at_time_zone test to expect correct timezone conversion
tonyalaribe Dec 27, 2025
20664f1
Remove ignored tests and fix CI configuration
tonyalaribe Dec 27, 2025
7db8be2
Fix JSON function test assertions to match actual behavior
tonyalaribe Dec 27, 2025
2421ec5
format code for ci
tonyalaribe Dec 27, 2025
cd78a3c
Add InfluxDB-inspired in-memory buffer with WAL
tonyalaribe Dec 27, 2025
f71406e
Fix clippy warnings
tonyalaribe Dec 27, 2025
cbe3ae6
Remove unused tempfile import in wal.rs
tonyalaribe Dec 27, 2025
c6a4498
Fix WAL and buffered write layer issues
tonyalaribe Dec 27, 2025
bfa8506
Add in-memory UPDATE/DELETE support for buffered write layer
tonyalaribe Dec 27, 2025
f823e26
Refactor DmlExec to use builder pattern to fix clippy warnings
tonyalaribe Dec 27, 2025
cf86ea7
Improve DML routing: skip Delta for uncommitted data
tonyalaribe Dec 27, 2025
c43a239
Fix WAL recovery, schema validation, timestamp bucketing, and shutdow…
tonyalaribe Dec 27, 2025
47e3a85
Fix critical issues: checkpoint ordering, memory limits, error handling
tonyalaribe Dec 27, 2025
2a80e9e
Fix formatting and clippy warning for CI
tonyalaribe Dec 27, 2025
8e43cd8
Fix infinite loop in WAL read on I/O error
tonyalaribe Dec 27, 2025
7d2c403
Trigger CI
tonyalaribe Dec 27, 2025
e017e83
Add WALRUS_DATA_DIR to CI and local test config
tonyalaribe Dec 27, 2025
e919757
Disable Foyer cache in CI to fix test hangs
tonyalaribe Dec 27, 2025
9b44f80
Fix infinite loop in WAL recovery by using checkpoint=true
tonyalaribe Dec 28, 2025
8e914d3
Enable Foyer cache in CI with small disk sizes
tonyalaribe Dec 28, 2025
52006ef
Centralize env var handling with envy crate
tonyalaribe Dec 28, 2025
f090f9d
Fix bounds check, add WAL corruption threshold, cleanup
tonyalaribe Dec 28, 2025
990efdd
Change default buffer retention from 90 to 70 minutes
tonyalaribe Dec 28, 2025
5181509
Fix clippy warnings: remove needless borrows, collapse nested ifs
tonyalaribe Dec 28, 2025
1dad8c2
fmt
tonyalaribe Dec 28, 2025
ac76b13
Add retry limit to memory reservation, improve type checks
tonyalaribe Dec 28, 2025
173751e
Document magic numbers and unsafe env var usage in tests
tonyalaribe Dec 28, 2025
e7b222a
Document RecordBatch clone is cheap (Arc-based, O(columns))
tonyalaribe Dec 28, 2025
1e5df5e
Optimize schema validation and parallelize bucket flushing
tonyalaribe Dec 28, 2025
d49d2e9
Fix flush ordering and document negative timestamp behavior
tonyalaribe Dec 28, 2025
8a94908
Document Delta callback contract: must complete commit before returning
tonyalaribe Dec 28, 2025
1ed53be
Clarify RecordBatch clone overhead: ~100 bytes/batch, not data size
tonyalaribe Dec 28, 2025
010e1b2
Add WAL support for DELETE and UPDATE operations
tonyalaribe Dec 28, 2025
cb830b0
Fix test isolation and config parsing issues
tonyalaribe Dec 29, 2025
4d66cb5
Refactor config to use explicit passing instead of OnceLock
tonyalaribe Dec 29, 2025
e50add9
Refactor for code conciseness: -471 lines
tonyalaribe Dec 29, 2025
5de70b4
Reduce code duplication with helper methods and macros
tonyalaribe Dec 29, 2025
ab5fdac
Replace perform_dml_with_buffer with DmlContext struct
tonyalaribe Dec 29, 2025
9f66e44
Fix statistics test: add missing page_row_limit argument
tonyalaribe Dec 29, 2025
e890a5e
fix fmt
tonyalaribe Dec 29, 2025
b9e6d84
Fix DML tests failing due to global config caching
tonyalaribe Dec 29, 2025
d86e6ae
update documentation and flatten the dashmap usage
tonyalaribe Dec 29, 2025
3a1baab
Remove unnecessary RwLock from TableBuffer.schema
tonyalaribe Dec 29, 2025
a176e0a
fmt
tonyalaribe Dec 29, 2025
aed141f
Merge pull request #12 from monoscope-tech/memtable
tonyalaribe Dec 29, 2025
071322e
fix blocking lock on runtime preventing running app
tonyalaribe Dec 29, 2025
288a488
Upgrade to DataFusion 52 with Utf8View support and fix WAL metadata l…
tonyalaribe Jan 29, 2026
9f3df13
Upgrade to DataFusion 52 with Utf8View support and fix WAL metadata l…
tonyalaribe Jan 29, 2026
fc5e9d5
Fix WAL safety issues and add memory reservation backoff
tonyalaribe Jan 29, 2026
201449d
Refactor: extract duplicated Delta scan logic and improve code safety
tonyalaribe Jan 29, 2026
02cf646
Fix WAL recovery test and improve error handling
tonyalaribe Jan 29, 2026
a91b3bf
cleanups
tonyalaribe Jan 29, 2026
f6e6e68
Merge pull request #14 from monoscope-tech/update-deps-and-test
tonyalaribe Jan 29, 2026
b61b6e6
Implement configurable PgWire authentication
tonyalaribe Jan 29, 2026
2567efa
Add Variant type support and fix SLT tests
tonyalaribe Jan 30, 2026
cfe89e7
Fix dependencies and add schema mismatch warning
tonyalaribe Jan 30, 2026
46a626d
Apply rustfmt and fix clippy warning
tonyalaribe Jan 30, 2026
6cffb4c
Improve Variant error handling and reduce code duplication
tonyalaribe Jan 30, 2026
0aa753e
Apply rustfmt
tonyalaribe Jan 30, 2026
6a90c86
Add depth limit to variant_to_serde_json to prevent stack overflow
tonyalaribe Jan 30, 2026
2b72658
Apply rustfmt
tonyalaribe Jan 30, 2026
f141491
Merge pull request #15 from monoscope-tech/variant-support2
tonyalaribe Jan 30, 2026
524082f
Align otel_logs_and_spans schema with monoscope
tonyalaribe Jan 30, 2026
aeefb6c
Unify data directory config and add Variant INSERT support
tonyalaribe Jan 31, 2026
c8eb41c
Add Variant SELECT rewriter and comprehensive architecture docs
tonyalaribe Feb 1, 2026
940b76f
Fix COUNT(*) and aggregation queries failing on empty projections
tonyalaribe Feb 2, 2026
bf29ef3
Add retry and timeout config to S3 object store
tonyalaribe Feb 2, 2026
f68ab0f
Fix correctness bugs and add performance optimizations
tonyalaribe Feb 16, 2026
81cf1ff
Switch WAL to Arrow IPC format, add flush compaction and configurable…
tonyalaribe Feb 16, 2026
be46a8f
Optimize read perf 70-89%, fix write regressions, add benchmarks
tonyalaribe Feb 16, 2026
057b262
x
tonyalaribe Feb 16, 2026
90a4eef
optimization attempt
tonyalaribe Feb 20, 2026
3fe349a
make fmt
tonyalaribe Feb 20, 2026
f37e05e
Fix Docker build failure due to missing bench file
tonyalaribe Feb 20, 2026
c618bd9
Migrate to delta-rs PR #4325 (variant type support) + dep upgrades
tonyalaribe May 13, 2026
d563fb2
Add tantivy sidecar, gRPC ingest, plan cache, stats table; skip Delta…
tonyalaribe May 18, 2026
f40626a
Tiered parquet compression with per-column bloom filters and daily re…
tonyalaribe May 26, 2026
f5216d8
Auto-tune host-aware sizing, OTel metrics, WAL corruption quarantine
tonyalaribe May 26, 2026
c160e4f
Transparent Tantivy: always-on indexing + predicate rewriter
tonyalaribe May 26, 2026
ab9da03
Tantivy n-gram tokenizer + LIKE/ILIKE substring acceleration
tonyalaribe May 26, 2026
21001b3
In-memory tantivy per MemBuffer bucket — close the indexing-lag gap
tonyalaribe May 26, 2026
cf3382c
Fix race in MemBuffer text-match prefilter
tonyalaribe May 26, 2026
51f8b9e
Production hardening: fail-secure auth, durable DML, quarantine perms…
tonyalaribe May 26, 2026
d16cffd
GA hardening: gRPC graceful shutdown, per-project metrics, LRU eviction
tonyalaribe May 26, 2026
c53d66c
Add RUNBOOK.md — production operations playbook
tonyalaribe May 26, 2026
33214b2
fix(grpc): constant-time bearer token comparison
tonyalaribe May 26, 2026
1693cc7
fix(wal): doc version mismatch, surface upgrade errors, typed shards …
tonyalaribe May 26, 2026
c2dff5d
perf+cleanup: cache indexed_tables, expect-on-guarded-downcasts, doc …
tonyalaribe May 26, 2026
819f82c
ci: install protoc, use nightly rustfmt, fix Dockerfile bench dummies
tonyalaribe May 26, 2026
347fb82
ci+review: green CI on PR #16 and address claude-review feedback
tonyalaribe May 26, 2026
b603450
ci(docker): bump builder rust to 1.91 (was 1.89, breaks on AWS SDK deps)
tonyalaribe May 26, 2026
8ea025b
test: bump test_concurrent_writes_same_project timeout 60s → 180s
tonyalaribe May 26, 2026
8dc6fa5
perf+review: TTL the storage_configs reload; drop cold-table update_s…
tonyalaribe May 26, 2026
ada096a
test: bump remaining Database+MinIO concurrency-test timeouts 60s → 180s
tonyalaribe May 26, 2026
5acbeab
review+ci: TOCTOU fix in dml, perf cleanups, skip CI-wedging concurre…
tonyalaribe May 27, 2026
8a3a794
fix+test: keep cold-table update_state refresh; ignore both-legs-writ…
tonyalaribe May 27, 2026
5d741ed
review: fix VariantSelectRewriter doc/code contradiction; document is…
tonyalaribe May 27, 2026
4659c7c
test: ignore delta_rs_api integration tests that wedge on shared Once…
tonyalaribe May 27, 2026
9aaebcd
fix: text_match UDF wildcard stripping; SLT cleanup + claude-review
tonyalaribe May 27, 2026
2b46739
test: ignore mixed_membuffer_and_delta_level_eq_returns_union
tonyalaribe May 27, 2026
ac11853
fix(wal): deterministic FNV-1a shard hashing; review cleanups
tonyalaribe May 27, 2026
48a2d2f
doctest: tag mem_index ASCII-art block as text fence
tonyalaribe May 27, 2026
44450be
review: union-arm note, project_id fallback warn!, ts-tz Result, refa…
tonyalaribe May 27, 2026
1269591
review: refresh on (None,Some); warn on insert_coerce skip; tighten p…
tonyalaribe May 27, 2026
dcf048e
review: warn-on-unwrapped Variant, parking_lot mutex, FNV golden test…
tonyalaribe May 27, 2026
44b4da1
review: actionability + intent comments
tonyalaribe May 27, 2026
fda60e5
review: tracing::warn (not log::warn), comment fixes, dml plan warn
tonyalaribe May 27, 2026
e56b242
review: warn at MAX_PEEL exhaustion; build_storage_options info→debug
tonyalaribe May 27, 2026
e639e7a
review: redact StorageConfig credentials; rename HARD_LIMIT divisor
tonyalaribe May 27, 2026
a543ab6
fix(variant): Postgres ->> text semantics; re-enable variant_function…
tonyalaribe May 27, 2026
06fdca4
fix(variant): peel through Filter; document plan_cache schema invariant
tonyalaribe May 27, 2026
caa7cf6
review: redact Serialize creds, log spam, cheaper plan-cache check, docs
tonyalaribe May 27, 2026
fe4684b
simplify: consolidate extract_project_id, tighten JsonToPgTextUdf, &'…
tonyalaribe May 27, 2026
421b343
fix(clippy): drop needless borrow after indexed_columns_for &'static …
tonyalaribe May 27, 2026
d5da777
fix(variant): hard-error on raw-binary-on-wire Union/Aggregate root
tonyalaribe May 27, 2026
de28fe5
fmt: nightly rustfmt rewrap on variant_select_rewriter test module
tonyalaribe May 27, 2026
c08ed59
test: ignore test_variant_column_round_trips_as_json pending extensio…
tonyalaribe May 27, 2026
a9892ac
fix(variant): branch-aware root wrap — add a Projection above un-peel…
tonyalaribe May 27, 2026
1ae4e37
address PR review: variant naming, dml laziness, fast-path docs
tonyalaribe May 27, 2026
1d7b84a
fix(variant-insert): hard-error unsupported INSERT shapes at plan time
tonyalaribe May 27, 2026
9a89628
fix(variant): re-stamp extension marker at UDF entry; recompute schem…
tonyalaribe May 27, 2026
b881d52
fmt: nightly rustfmt rewrap
tonyalaribe May 27, 2026
f23d55f
Merge pull request #16 from monoscope-tech/optimize
tonyalaribe May 27, 2026
9b16a7a
encrypt s3 credentials at rest in timefusion_projects
tonyalaribe May 27, 2026
474bb07
ci+tests: safe cleanups split from #11 (#17)
tonyalaribe May 27, 2026
02fbb37
fix(docker): runtime stage glibc mismatch; switch to distroless/cc (#19)
tonyalaribe May 28, 2026
a7f74c1
perf(release): fat LTO + single codegen-unit + strip symbols (#20)
tonyalaribe May 28, 2026
49128a4
fix: greedy memory pool default + batch queue default + CI smoke (#21)
tonyalaribe May 28, 2026
fab035c
fmt: rustfmt single-line for memory pool match block (#22)
tonyalaribe May 28, 2026
478e8d9
fix(pgwire): rewrite ABORT -> ROLLBACK at simple-query entry (#23)
tonyalaribe May 28, 2026
519b324
fix(pgwire): rewrite ABORT -> ROLLBACK in extended-query path too (#24)
tonyalaribe May 28, 2026
f44227d
fix(write-layer): use flush_all_now under memory pressure (#25)
tonyalaribe May 29, 2026
8ffa508
fix(mem_buffer): strip column qualifiers in update/delete predicate a…
tonyalaribe May 29, 2026
87a24a2
fix(pgwire_handlers): move tests mod to bottom of file
tonyalaribe May 29, 2026
ba47055
fix(dml): inline CSE-aliased columns into UPDATE assignments
tonyalaribe May 29, 2026
fcc539f
test(dml): add regression tests for qualifier + CSE UPDATE bugs
tonyalaribe May 29, 2026
fc5f2c6
fix(wal-replay): plumb function registry into UPDATE/DELETE SQL parser
tonyalaribe May 29, 2026
5d0b6bc
chore(autofmt): apply cargo fmt + clippy --fix [skip autofmt]
github-actions[bot] May 29, 2026
54c8e71
refactor(wal-replay): simplify per /simplify review
tonyalaribe May 29, 2026
6b6305e
chore(autofmt): apply cargo fmt + clippy --fix [skip autofmt]
github-actions[bot] May 29, 2026
66f5ca0
refactor(wal-replay): require FunctionRegistry at layer construction;…
tonyalaribe May 29, 2026
ac040fb
chore(autofmt): apply cargo fmt + clippy --fix [skip autofmt]
github-actions[bot] May 29, 2026
d1f113f
refactor(wal-replay): per /simplify round 2
tonyalaribe May 29, 2026
cd48867
functions: alias to_json as to_jsonb for Postgres-compatible queries
tonyalaribe May 30, 2026
ce0f188
chore(autofmt): apply cargo fmt + clippy --fix [skip autofmt]
github-actions[bot] May 30, 2026
7d053b2
pgwire: tag DML responses off LogicalPlan, not the parsed AST
tonyalaribe Jun 3, 2026
67d465d
vendor walrus + add WalPosition APIs for Step 5 watermarking
tonyalaribe Jun 4, 2026
bd8baf3
zero-replay-shutdown: pgwire stop-accept, raised shutdown timeout
tonyalaribe Jun 4, 2026
dcac6b7
zero-replay-shutdown: per-shard walrus watermark in Delta commit meta…
tonyalaribe Jun 4, 2026
e49629f
watermark: extract serialize/parse helpers + format roundtrip tests
tonyalaribe Jun 4, 2026
30b7abf
simplify: consolidate per-shard wal helpers, merge bucket mutex
tonyalaribe Jun 4, 2026
8d2d18d
dedup: last-write-wins on per-table dedup_keys at flush time
tonyalaribe Jun 4, 2026
0f31673
chore(autofmt): apply cargo fmt + clippy --fix [skip autofmt]
github-actions[bot] Jun 4, 2026
065e623
pgwire: emit NoData at Describe for DML (fix Hasql/pgjdbc poison rows…
tonyalaribe Jun 4, 2026
c521f43
Consolidate metrics boilerplate and dedupe quick wins
claude Jun 4, 2026
c484c7f
Replace hand-written Debug/Display impls with derive_more
claude Jun 4, 2026
2bd8048
Dedupe object_store_cache payload/path helpers
claude Jun 4, 2026
c363a73
Extract extract_scalar_string helper in functions.rs
claude Jun 4, 2026
c7d359f
Add scalar_udf_boilerplate! macro for the 8 UDF impls
claude Jun 4, 2026
dbfefbb
DRY up array_to_json_values arms and manifest load-mutate-save
claude Jun 4, 2026
cde8e5a
Extract filter_snapshot helper in mem_buffer
claude Jun 4, 2026
fbd510f
Share AwsConfig::add_dynamodb_locking_options
claude Jun 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
56 changes: 56 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# PostgreSQL Configuration Database (optional)
# If set, TimeFusion will load project configurations from this database
# Otherwise, it will use the AWS environment variables below
TIMEFUSION_CONFIG_DATABASE_URL=postgresql://user:password@host:port/database
# Configuration polling interval in seconds (default: 30)
TIMEFUSION_CONFIG_POLL_INTERVAL_SECS=30

# Direct S3 Configuration (used if TIMEFUSION_CONFIG_DATABASE_URL is not set)
AWS_REGION=
AWS_S3_BUCKET=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
PGWIRE_PORT=5432
PGWIRE_USER=postgres
PGWIRE_PASSWORD=postgres
TIMEFUSION_TABLE_PREFIX=timefusion

# Delta Lake DynamoDB Locking Configuration (optional but recommended for multi-writer scenarios)
# Set to 'dynamodb' to enable DynamoDB-based locking for Delta Lake operations
AWS_S3_LOCKING_PROVIDER=
# Name of the DynamoDB table to use for locking (must be created beforehand)
# Table should have 'key' as the partition key (String type)
DELTA_DYNAMO_TABLE_NAME=

# Batch insert configuration
# Interval between batch inserts in milliseconds (default: 1000)
BATCH_INTERVAL_MS=1000
# Maximum number of rows to process in a single batch (default: 1000)
MAX_BATCH_SIZE=1000
# Set to "true" to enable batching queue (default: false = direct insertion)
ENABLE_BATCH_QUEUE=false
# Maximum number of concurrent PostgreSQL connections (default: 100)
MAX_PG_CONNECTIONS=100

# DataFusion tracing configuration
# Enable/disable metrics recording in query traces (default: true)
TIMEFUSION_TRACING_RECORD_METRICS=true

# OpenTelemetry Configuration
# OTLP endpoint for sending traces (e.g., http://localhost:4317 for gRPC or http://localhost:4318 for HTTP)
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
# Service name for this application
OTEL_SERVICE_NAME=timefusion
# Optional: Additional resource attributes (comma-separated key=value pairs)
OTEL_RESOURCE_ATTRIBUTES=environment=development,version=0.1.0
# Optional: Trace sampling ratio (0.0-1.0, default: 1.0)
OTEL_TRACES_SAMPLER_RATIO=1.0
# Optional: Export protocol (grpc or http/protobuf, default: grpc)
OTEL_EXPORTER_OTLP_PROTOCOL=grpc
# Optional: Headers for authentication (e.g., api-key=your-key)
OTEL_EXPORTER_OTLP_HEADERS=
# Optional: Enable/disable tracing (default: true)
OTEL_SDK_DISABLED=false

# Data Directory (WAL stored in {dir}/wal, cache in {dir}/cache)
TIMEFUSION_DATA_DIR=./data
33 changes: 33 additions & 0 deletions .env.minio
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# MinIO Configuration for Local Testing
AWS_SDK_LOAD_CONFIG=false
AWS_ENDPOINT_URL=http://127.0.0.1:9000
AWS_REGION=us-east-1
AWS_S3_BUCKET=timefusion-test
AWS_S3_ENDPOINT=http://127.0.0.1:9000
AWS_ALLOW_HTTP=true
AWS_ACCESS_KEY_ID=minioadmin
AWS_SECRET_ACCESS_KEY=minioadmin
PGWIRE_PORT=12345
PGWIRE_USER=postgres
PGWIRE_PASSWORD=postgres
PORT=80

TIMEFUSION_TABLE_PREFIX=timefusion-minio-test

# Batch insert configuration
BATCH_INTERVAL_MS=1000
MAX_BATCH_SIZE=1000
ENABLE_BATCH_QUEUE=true
MAX_PG_CONNECTIONS=100

# MinIO doesn't need DynamoDB locking, use local locking
AWS_S3_LOCKING_PROVIDER=""

# WAL storage directory for walrus-rust
TIMEFUSION_DATA_DIR=./data/minio

# Foyer cache configuration for tests
TIMEFUSION_FOYER_MEMORY_MB=256
TIMEFUSION_FOYER_DISK_GB=10
TIMEFUSION_FOYER_TTL_SECONDS=300
TIMEFUSION_FOYER_SHARDS=8
48 changes: 48 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Test Configuration for TimeFusion
# This file contains MinIO test credentials for local development

# MinIO S3 Storage Configuration
AWS_ENDPOINT_URL=http://127.0.0.1:9000
AWS_REGION=us-east-1
AWS_S3_BUCKET=timefusion-tests
AWS_S3_ENDPOINT=http://127.0.0.1:9000
AWS_ALLOW_HTTP=true
AWS_ACCESS_KEY_ID=minioadmin
AWS_SECRET_ACCESS_KEY=minioadmin
AWS_SDK_LOAD_CONFIG=false

# PostgreSQL Wire Protocol Configuration
PGWIRE_PORT=12345
PGWIRE_USER=postgres
PGWIRE_PASSWORD=postgres
TIMEFUSION_TABLE_PREFIX=test

# No DynamoDB locking for tests (uses local file-based locking)
# AWS_S3_LOCKING_PROVIDER=

# Batch Processing Configuration
BATCH_INTERVAL_MS=100
MAX_BATCH_SIZE=100
ENABLE_BATCH_QUEUE=true
MAX_PG_CONNECTIONS=10
TIMEFUSION_BATCH_QUEUE_CAPACITY=100

# Delta Lake Configuration (optimized for testing)
TIMEFUSION_PAGE_ROW_COUNT_LIMIT=1000
TIMEFUSION_ZSTD_COMPRESSION_LEVEL=3
TIMEFUSION_MAX_ROW_GROUP_SIZE=10485760
TIMEFUSION_OPTIMIZE_TARGET_SIZE=52428800
TIMEFUSION_CHECKPOINT_INTERVAL=5
TIMEFUSION_VACUUM_RETENTION_HOURS=1

# Foyer Cache Configuration (smaller for tests)
TIMEFUSION_FOYER_MEMORY_MB=64
TIMEFUSION_FOYER_DISK_GB=1
TIMEFUSION_FOYER_TTL_SECONDS=60
TIMEFUSION_DATA_DIR=./data/test
TIMEFUSION_FOYER_SHARDS=4
TIMEFUSION_FOYER_FILE_SIZE_MB=8
TIMEFUSION_FOYER_STATS=true

# Logging Configuration
RUST_LOG=debug
72 changes: 72 additions & 0 deletions .github/workflows/autoformat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Auto-format & Auto-fix

# On every push to master, run `cargo fmt` and `cargo clippy --fix`, then
# commit any changes back to master. Skips itself on bot-authored commits to
# avoid infinite loops, and on PR merges that are already CI-clean.
on:
push:
branches: [master]

permissions:
contents: write

jobs:
autofix:
# Skip when the previous commit was the bot itself (prevents loops) and
# when the commit message contains [skip autofmt].
if: |
github.event.head_commit.author.email != 'noreply@github.com' &&
!contains(github.event.head_commit.message, '[skip autofmt]') &&
!contains(github.event.head_commit.message, 'chore(autofmt)')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Need write access via the default token; fetch full history so we
# can push the resulting commit cleanly.
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install nightly + stable toolchains
run: |
rustup toolchain install nightly --component rustfmt
rustup toolchain install stable --component clippy

- name: Install protoc
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler

- uses: Swatinem/rust-cache@v2

# rustfmt.toml uses nightly-only options — must invoke +nightly explicitly
# so it matches the CI fmt-check job.
- name: Run cargo fmt
run: cargo +nightly fmt --all

- name: Run cargo clippy --fix
# --allow-dirty because fmt may have already produced uncommitted changes.
# --allow-staged for the same reason in case any pre-stage runs.
# Intentionally non-fatal: clippy autofixes are best-effort. If a fix
# introduces a compile error, we revert and only push the fmt changes.
run: |
set +e
cargo clippy --fix --all-targets --all-features --allow-dirty --allow-staged -- -D warnings
rc=$?
if [ $rc -ne 0 ]; then
echo "clippy --fix failed (likely couldn't auto-fix every warning); reverting clippy hunks only"
# Re-apply fmt result on top of HEAD without clippy's partial changes.
git checkout -- .
cargo +nightly fmt --all
fi
exit 0

- name: Commit & push if changed
run: |
if [ -z "$(git status --porcelain)" ]; then
echo "No formatting / clippy changes — nothing to push."
exit 0
fi
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add -A
git commit -m "chore(autofmt): apply cargo fmt + clippy --fix [skip autofmt]"
git push origin HEAD:master
106 changes: 106 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: CI

on:
push:
branches: [master, main]
pull_request:
branches: [master, main]

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# rustfmt.toml uses nightly-only options (wrap_comments, imports_granularity,
# group_imports, format_code_in_doc_comments, normalize_doc_attributes,
# empty_item_single_line, struct_field_align_threshold). Stable fmt
# silently drops them and reformats differently → CI mismatch.
# rust-toolchain.toml pins to stable, so install nightly *and* invoke it
# explicitly with `+nightly` so cargo doesn't fall back to the pinned channel.
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo +nightly fmt --all --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install protoc
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-targets --all-features -- -D warnings

check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install protoc
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
- uses: Swatinem/rust-cache@v2
- run: cargo check --all-targets --all-features

test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 15
env:
AWS_SDK_LOAD_CONFIG: "false"
AWS_ENDPOINT_URL: http://127.0.0.1:9000
AWS_REGION: us-east-1
AWS_S3_BUCKET: timefusion-test
AWS_S3_ENDPOINT: http://127.0.0.1:9000
AWS_ALLOW_HTTP: "true"
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
PGWIRE_PORT: "12345"
PORT: "8080"
TIMEFUSION_TABLE_PREFIX: timefusion-ci-test
BATCH_INTERVAL_MS: "1000"
MAX_BATCH_SIZE: "1000"
ENABLE_BATCH_QUEUE: "true"
MAX_PG_CONNECTIONS: "100"
AWS_S3_LOCKING_PROVIDER: ""
WALRUS_DATA_DIR: /tmp/walrus-wal
# Use small cache sizes for CI tests (similar to test_config in object_store_cache.rs)
TIMEFUSION_FOYER_MEMORY_MB: "10"
TIMEFUSION_FOYER_DISK_MB: "50"
TIMEFUSION_FOYER_METADATA_MEMORY_MB: "10"
TIMEFUSION_FOYER_METADATA_DISK_MB: "50"
TIMEFUSION_FOYER_SHARDS: "2"
services:
minio:
image: public.ecr.aws/bitnami/minio:latest
ports:
- 9000:9000
env:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin
MINIO_DEFAULT_BUCKETS: timefusion-test,timefusion-tests
options: >-
--health-cmd "curl -f http://localhost:9000/minio/health/live || exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Free disk space
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install protoc
run: sudo apt-get install -y protobuf-compiler
- uses: Swatinem/rust-cache@v2

- name: Run all tests
run: cargo test --all-features
57 changes: 57 additions & 0 deletions .github/workflows/claude-code-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Claude Code Review

on:
pull_request:
types: [opened, synchronize]
# Optional: Only run on specific file changes
# paths:
# - "src/**/*.ts"
# - "src/**/*.tsx"
# - "src/**/*.js"
# - "src/**/*.jsx"

jobs:
claude-review:
# Optional: Filter by PR author
# if: |
# github.event.pull_request.user.login == 'external-contributor' ||
# github.event.pull_request.user.login == 'new-developer' ||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}

Please review this pull request and provide feedback on:
- Code quality and best practices
- Potential bugs or issues
- Performance considerations
- Security concerns
- Test coverage

Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.

Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.

# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'

Loading
Loading