dimbtp
dd18d8c97b
build(deps): remove some unused dependencies ( #3582 )
...
* build(deps): remove some unused dependencies
* add `arc-swap` dependency back
2024-03-26 12:48:28 +00:00
SteveLauC
e9a2b0a9ee
chore: use workspace-wide lints ( #3352 )
...
* chore: use workspace-wide lints
* respond to review
2024-02-22 01:01:10 +00:00
niebayes
63205907fb
refactor: introduce common-wal to aggregate wal stuff ( #3171 )
...
* refactor: aggregate wal configs
* refactor: move wal options to common-wal
* chore: slim Cargo.toml
* fix: add missing crates
* fix: format
* chore: update comments
* chore: add testing feature gate for test_util
* fix: apply suggestions from code review
Co-authored-by: JeremyHi <jiachun_feng@proton.me >
* fix: apply suggestions from code review
* fix: compiling
---------
Co-authored-by: JeremyHi <jiachun_feng@proton.me >
2024-01-18 03:49:37 +00:00
niebayes
7d509e97f6
chore: move some commonly referenced crates to workspace Cargo.toml ( #2981 )
...
fix: resolve conflicts
2023-12-22 09:13:18 +00:00
niebayes
9da1f236d9
feat(remote_wal): add skeleton for remote wal related to datanode ( #2941 )
...
* refactor: refactor wal config
* test: update tests related to wal
* feat: introduce kafka wal config
* chore: augment proto with wal options
* feat: augment region open request with wal options
* feat: augment mito region with wal options
* feat: augment region create request with wal options
* refactor: refactor log store trait
* feat: add skeleton for kafka log store
* feat: generalize building log store when starting datanode
* feat: integrate wal options to region write
* chore: minor update
* refactor: remove wal options from region create/open requests
* fix: compliation issues
* chore: insert wal options into region options upon initializing region server
* chore: integrate wal options into region options
* chore: fill in kafka wal config
* chore: reuse namespaces while writing to wal
* chore: minor update
* chore: fetch wal options from region while handling truncate/flush
* fix: region options test
* fix: resolve some review conversations
* refactor: serde with wal options
* fix: resolve some review conversations
2023-12-20 09:01:17 +00:00
Zhenchi
029ff2f1e3
feat(inverted_index.create): add read/write for external intermediate files ( #2942 )
...
* feat(inverted_index.create): add read/write for external intermediate files
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* chore: MAGIC_CODEC_V1 -> CODEC_V1_MAGIC
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* chore: polish comments
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* chore: fix typos intermedia -> intermediate
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* fix: typos
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* chore: futures_code -> asynchronous_codec
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* chore: bump bytes to 1.5
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
---------
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
2023-12-18 09:44:48 +00:00
Ruihang Xia
93f21b188d
chore: unify workspace dependencies and remove some unused ( #2713 )
...
* log-store
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* base64
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* udeps
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* snafu
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* snafu style
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* change the workspace deps' style
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2023-11-09 07:34:22 +00:00
Yingwen
d4577e7372
feat(mito): add metrics to mito engine ( #2556 )
...
* feat: allow discarding a timer
* feat: flush metrics
* feat: flush bytes and region count metrics
* refactor: add as_str to get static string
* feat: add handle request elapsed metrics
* feat: add some write related metrics
* style: fix clippy
2023-10-10 03:53:17 +00:00
Ruihang Xia
515ce825bd
feat: stack trace style debug print for error ( #2489 )
...
* impl macro stack_trace_debug
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* manually mark external error
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* ignore warnings
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy warnings
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* use debug print
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* simplify the error and warn macro
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix ut
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* add docs
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* replace snafu backtrace with location
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2023-09-26 11:23:21 +00:00
Yingwen
4a82926d72
docs: fix cargo doc errors and warnings ( #2421 )
...
* docs: fix cargo doc warnings and errors
* docs: fix warnings
* docs: fix warnings
* chore: rm src/common/function-macro/src/lib.rs
2023-09-17 11:45:15 +00:00
dennis zhuang
627c5b7419
feat: move table operations from frontend to operator crate ( #2411 )
...
* feat: move table operations from frontend to operator crate
* chore: blank line
* fix: toml format
* chore: move constants
2023-09-16 07:58:45 +00:00
Ruihang Xia
4c3169431b
feat: move region metadata to store-api ( #2181 )
...
* add metadata & handle_read
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* move metadata to store-api
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* dep aquamarine
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove deadcode
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove temporary code
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* Update src/store-api/Cargo.toml
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com >
* remove old mod
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com >
2023-08-16 04:18:26 +00:00
Ruihang Xia
2168970814
feat: define region server and related requests ( #2160 )
...
* define region server and related requests
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fill request body
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* change mito2's request type
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* chore: bump greptime-proto to d9167cab (row insert/delete)
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix test compile
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove name_to_index
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* address cr comments
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* finilise
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2023-08-15 06:27:27 +00:00
Lei, HUANG
e924b44e83
refactor: KeyValues return ValueRef ( #2170 )
...
* refactor: KeyValues return ValueRef
* 1. Change KeyValues returned value from pb value to ValueRef
2. Replace OpType/SemanticType with pb's OpType and SemanticType to avoid duplicated conversions.
* feat: define min value of OpType as a const
* fix: toml format
2023-08-14 14:51:13 +00:00
Ning Sun
c39de9072f
refactor: use workspace dependencies for internal modules ( #2119 )
...
* refactor: use workspace dependencies for internal modules
* fix: resolve issue with mock module in datanode
* refactor: update test modules
2023-08-08 11:02:34 +00:00
shuiyisong
9c1f0234de
refactor: query context ( #2022 )
...
* chore: refactor query_context
* chore: remove use statement
* chore: make query_context build return arc
* fix: sqlness test
* fix: cr issue
* fix: use unwrap or else
2023-07-25 06:11:34 +00:00
Ruihang Xia
b27c569ae0
refactor: add scan_to_stream() to Table trait to postpone the stream generation ( #1639 )
...
* add scan_to_stream to Table
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* impl parquet stream
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* reorganise adapters
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* implement scan_to_stream for mito table
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* clean up
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* add location info
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix: table scan
* UT pass
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* impl project record batch
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix information schema
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* resolve CR comments
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove one todo
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix errors generated by merge commit
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* add output_ordering method to record batch stream
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix rustfmt
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* enhance error types
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: Lei, HUANG <mrsatangel@gmail.com >
2023-05-29 20:03:47 +08:00
Ruihang Xia
36a13dafb7
build(deps): bump tokio to 1.24.2 ( #900 )
...
deps: bump tokio to 1.24.2
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2023-01-29 11:13:37 +08:00
LFC
04df80e640
fix: further ease the restriction of executing SQLs in new GRPC interface ( #797 )
...
* fix: carry not recordbatch result in FlightData, to allow executing SQLs other than selection in new GRPC interface
* Update src/datanode/src/instance/flight/stream.rs
Co-authored-by: Jiachun Feng <jiachun_feng@proton.me >
2022-12-28 16:43:21 +08:00
Ruihang Xia
26a3e93ca7
chore: util workspace deps in more places ( #792 )
...
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2022-12-27 16:26:59 +08:00
LFC
dc52a51576
chore: upgrade to Arrow 29.0 and use workspace package and dependencies ( #782 )
...
* chore: upgrade to Arrow 29.0 and use workspace package and dependencies
* fix: resolve PR comments
Co-authored-by: luofucong <luofucong@greptime.com >
2022-12-23 14:28:37 +08:00
Ruihang Xia
7ba512980a
chore: add APACHE-2.0 license header ( #518 )
...
* feat: add license checker workflow
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix existing header
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* specify license for internal sub-crate
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix rustfmt
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2022-11-15 18:05:46 +08:00
Ruihang Xia
fbea07ea83
chore: remove unused dependencies ( #319 )
...
* chore: remove unused dependences
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix: recover some dev-deps
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2022-10-19 14:08:54 +08:00
Lei, Huang
35ba0868b5
feat: impl filter push down to parquet reader ( #262 )
...
* wip add predicate definition
* fix value move
* implement predicate and prune
* impl filter push down in chunk reader
* add more expr tests
* chore: rebase develop
* fix: unit test
* fix: field name/index lookup when building pruning stats
* chore: add some meaningless test
* fix: remove unnecessary extern crate
* fix: use datatypes::schema::SchemaRef
2022-09-21 11:47:55 +08:00
dennis zhuang
c8cb705d9e
ci: pre-commit configuration and hooks ( #261 )
...
* feat: adds pre-commit config and hooks
* refactor: sort all Cargo.toml by cargo-sort
* ci: adds conventional-pre-commit hook to pre-commit
* fix: remove .pre-commit-hooks.yaml
* fix: readme
* Update .pre-commit-config.yaml
Co-authored-by: Lei, Huang <6406592+v0y4g3r@users.noreply.github.com >
* ci: move clippy hook to push stage
* docs: install pre-push github hook
Co-authored-by: Lei, Huang <6406592+v0y4g3r@users.noreply.github.com >
2022-09-15 11:30:08 +08:00
Ning Sun
62cb649389
refactor: use derive_builder for boilerplate builders ( #116 )
...
* refactor: remove boilerplate builder code with derive_builder macro
* refactor: better build creation using Default::default()
* refactor: resolve api change issues in benchmark code
* refactor: address some review issues
* refactor: address clippy issues
* chore: doc and todo update
* refactor: add builder for RegionDescriptor
2022-07-29 14:31:12 +08:00
evenyag
c9db093af7
feat: Cherry picks lost commits of flush ( #111 )
...
* fix: Fix write stall blocks flush applying version
refactor: Use store config to help constructing Region
chore: Address CR comments
* feat: adds manifest protocol supporting and refactor region metadata protocol
feat: ignore sqlparser log
refactor: PREV_VERSION_KEY constant
refactor: minor change for checking readable/writable
fix: address CR problems
refactor: use binary literal
Co-authored-by: Dennis Zhuang <killme2008@gmail.com >
2022-07-26 15:52:39 +08:00
evenyag
bf5975ca3e
feat: Prototype of the storage engine ( #107 )
...
* feat: memtable flush (#63 )
* wip: memtable flush
* optimize schema conversion
* remove unnecessary import
* add parquet file verfication
* add backtrace to error
* chore: upgrade opendal to 0.9 and fixed some problems
* rename error
* fix: error description
Co-authored-by: Dennis Zhuang <killme2008@gmail.com >
* feat: region manifest service (#57 )
* feat: adds Manifest API
* feat: impl region manifest service
* refactor: by CR comments
* fix: storage error mod test
* fix: tweak storage cargo
* fix: tweak storage cargo
* refactor: by CR comments
* refactor: rename current_version
* feat: add wal writer (#60 )
* feat: add Wal
* upgrade engine for wal
* fix: unit test for wal
* feat: wal into region
* fix: unix test
* fix clippy
* chore: by cr
* chore: by cr
* chore: prevent test data polution
* chore: by cr
* minor fix
* chore: by cr
* feat: Implement flush (#65 )
* feat: Flush framework
- feat: Add id to memtable
- refactor: Rename MemtableSet/MutableMemtables to MemtableVersion/MemtableSet
- feat: Freeze memtable
- feat: Trigger flush
- feat: Background job pool
- feat: flush job
- feat: Sst access layer
- feat: Custom Deserialize for StringBytes
- feat: Use RegionWriter to apply file metas
- feat: Apply version edit
- chore: Remove unused imports
refactor: Use ParquetWriter to replace FlushTask
refactor: FsAccessLayer takes object store as param
chore: Remove todo from doc comments
feat: Move wal to WriterContext
chore: Fix clippy
chore: Add backtrace to WriteWal error
* feat: adds manifest to region and refactor sst/manifest dir config (#72 )
* feat: adds manifest to region and refactor sst/manifest dir with EngineConfig
* refactor: ensure path ends with '/' in ManifestLogStorage
* fix: style
* refactor: normalize storage directory path and minor changes by CR
* refactor: doesn't need slash any more
* feat: Implement apply_edit() and add timestamp index to schema (#73 )
* feat: Implement VersionControl::apply_edit()
* feat: Add timestamp index to schema
* feat: Implement Schema::timestamp_column()
* feat: persist region metadata to manifest (#74 )
* feat: persist metadata when creating region or sst files
* fix: revert FileMeta comment
* feat: resolve todo
* fix: clippy warning
* fix: revert files_to_remove type in RegionEdit
* feat: impl SizeBasedStrategy for flush (#76 )
* feat: impl SizeBasedStrategy for flush
* doc: get_mutable_limitation
* fix: code style and comment
* feat: align timestamp (#75 )
* feat: align timestamps in write batch
* fix cr comments
* fix timestamp overflow
* simplify overflow check
* fix cr comments
* fix clippy issues
* test: Fix region tests (comment out some unsupported tests) (#82 )
* feat: flush job (#80 )
* feat: flush job
* fix cr comments
* move file name instead of clone
* comment log file test (#84 )
* feat: improve MemtableVersion (#78 )
* feat: improve MemtableVersion
* feat: remove flushed immutable memtables and test MemtableVersion
* refactor: by CR comments
* refactor: clone kv in iterator
* fix: clippy warning
* refactor: Make BatchIterator supertrait of Iterator (#85 )
* refactor: rename Version to ManifestVersion and move out manifest from ShareData (#83 )
* feat: Insert multiple memtables by time range (#77 )
* feat: memtable::Inserter supports insert multiple memtables by time range
* chore: Update timestamp comment
* test: Add tests for Inserter
* test: Fix region tests (comment out some unsupported tests)
* refactor: align_timestamp() use TimestampMillis::aligned_by_bucket()
* chore: rename aligned_by_bucket to align_by_bucket
* fix: Fix compile errors
* fix: sst and manifest dir (#86 )
* Set RowKeyDescriptor::enable_version_column to false by default
* feat: Implement write stall (#90 )
* feat: Implement write stall
* chore: Update comments
* feat: Support reading multiple memtables (#93 )
* feat: Support reading multiple memtables
* test: uncomment tests rely on snapshot read
* feat: wal format (#70 )
* feat: wal codec
* chore: minor fix
* chore: comment
* chore: by cr
* chore: write_batch_codec mod
* chore: by cr
* chore: upgrade proto
* chore: by cr
* fix failing test
* fix failing test
* feat: manifest to wal (#100 )
* feat: write manifest to wal
* chore: sequence into wal
* chore: by cr
* chore: by cr
* refactor: create log store (#104 )
Co-authored-by: dennis zhuang <killme2008@gmail.com >
Co-authored-by: Lei, Huang <6406592+v0y4g3r@users.noreply.github.com >
Co-authored-by: fariygirl <clickmetoday@163.com >
Co-authored-by: Jiachun Feng <jiachun_feng@proton.me >
Co-authored-by: Lei, HUANG <mrsatangel@gmail.com >
* chore: Fix clippy
Co-authored-by: Lei, Huang <6406592+v0y4g3r@users.noreply.github.com >
Co-authored-by: Dennis Zhuang <killme2008@gmail.com >
Co-authored-by: Jiachun Feng <jiachun_feng@proton.me >
Co-authored-by: fariygirl <clickmetoday@163.com >
Co-authored-by: Lei, HUANG <mrsatangel@gmail.com >
2022-07-25 15:26:00 +08:00
Lei, Huang
008f62afc1
feat: buffer abstraction ( #51 )
...
* feat: add buffer abstraction and rewrite entry encode/decode process
* add some tests
* remove pad.rst
* fix some comments
* fix comments
* remove mmap mod
* feat: Bytes type implementation switch to bytes::Bytes
* fix: use Bytes::from(String) and Bytes::from(Vec<u8>)
* feat: add new method to Entry trait
2022-07-04 14:08:23 +08:00
Lei, Huang
e03ac2fc2b
Implement log store append and file set management ( #43 )
...
* add log store impl
* add some test
* delete failing test
* fix: concurrent close issue
* feat: use arcswap to replace unsafe AtomicPtr
* fix: use lock to protect rolling procedure.
fix: use try_recv to replace poll_recv on appender task.
* chores: 1. use direct tmp dir instead of creating TempDir instance; 2. inline some short function; 3. rename some structs; 4. optimize namespace to arc wrapper inner struct.
2022-06-16 19:09:09 +08:00
evenyag
4171173b76
feat: Support creating in memory region and writing to memtable ( #40 )
...
* chore(store-api): Fix typo in region comments
* feat(storage): Init storage crate
* feat(store-api): Make some method async
* feat(storage): Blank StorageEngine implementation
* feat(storage): StorageEngine returns owned SchemaRef
* feat: pub use arrow in datatypes
* feat(store-api): Implement RegionMetadata
* feat(storage): Impl create region in memory.
* chore(object-store): Format cargo toml
* chore(storage): Log on region created
* feat: Impl CowCell
* feat: Store id to cf meta mapping
* refactor: Refactor version and rename it to VersionControl
* feat: Impl write batch for put, refactor column family
* feat(storage): Skeleton of writing to memtable
* refactor(storage): MemTable returns MemTableSchema
* feat: Add ColumnSchema and conversion between schema and arrow's schema
* feat: Validate put data
* feat: Valid schema of write batch
* feat: insert memtable WIP
* feat: Impl Inserter for memtable
* feat(datatypes): Implement Eq/Ord for Value
feat: Implement Ord/Eq for Bytes/StringBytes and Deref for Bytes
test: Test Value::from()
* feat: Define BTreeMemTable
* Fix: Rename get/get_unchecked to try_get/get and fix get not consider null.
* feat: Impl BTreeMemTable::write()
* refactor: Remove useless ColumnFamilyHandle now
* chore: Clean comment
* feat(common): Add from `String/&str/Vec<u8>/&[u8]` for Value
* test(storage): Add tests for WriteBatch
* chore: Fix clippy
* feat: Add builder for RowKey/ColumnFamilyDescriptor
* test: Add test for metadata
* chore: Fix clippy
* test: Add test for region and engine
* chore: Fix clippy
* chore: Address CR comment
2022-06-09 16:50:02 +08:00
Lei, Huang
06b592f00f
feat: add WAL definitions ( #35 )
...
* feat: add WAL definitions
* rename and add some tests
2022-05-24 16:12:23 +08:00
evenyag
1594da337f
feat(store-api): Prototype of storage engine api ( #33 )
2022-05-20 18:51:51 +08:00
evenyag
5777732fde
feat(store-api): Init store-api crate ( #30 )
2022-05-18 17:19:57 +08:00