GreptimeTeam / greptimedb

An open-source, cloud-native, unified time series database for metrics, logs and events with SQL/PromQL supported. Available on GreptimeCloud.
https://greptime.com/
Apache License 2.0
4.19k stars 300 forks source link

Table-level WAL switch #1267

Open v0y4g3r opened 1 year ago

v0y4g3r commented 1 year ago

What problem does the new feature solve?

Not all tables require durability at the cost of insert throughput. With periodical table flush, losing a short period of data in memtable is acceptable in some scenarios.

What does the feature do?

Allow user to specify whether to skip writing WAL on data ingestion.

Implementation challenges

Add a table option on creation, maybe skip_wal. In write_to_wal, check if this table should skip WAL. https://github.com/GreptimeTeam/greptimedb/blob/b31a6cb506c5fd4cee417ddb3c0780d25272b505/src/storage/src/wal.rs#L103-L113

If skip_wal is true, simply return the sequence number as entry id without actually writing to underlying log store.

WangTingZheng commented 1 year ago

I want to try this issues.

killme2008 commented 1 year ago

@WangTingZheng hello, are u still working on this feature?

WangTingZheng commented 1 year ago

@WangTingZheng hello, are u still working on this feature?

I'm sorry, I may not have enough time to complete this task recently.

killme2008 commented 1 year ago

@WangTingZheng That's fine. So may I assign this task to other developers? Thank u.

evenyag commented 1 year ago

We are refactoring the mito table engine and the implementation hint in the description will soon become outdated. So I self-assign this task first.

niebayes commented 10 months ago

See the implementation of the Kafka Remote Wal #2722 .