Commit Graph

83 Commits

Author SHA1 Message Date
afcc6170f6 [fix](txn_manager) Add ingested rowsets to unused rowsets when removing txn (#37417)
Generally speaking, as long as a rowset has a version, it can be
considered not to be in a pending state. However, if the rowset was
created through ingesting binlogs, it will have a version but should
still be considered in a pending state because the ingesting txn has not
yet been committed.

This PR updates the condition for determining the pending state. If a
rowset is COMMITTED, the txn should be allowed to roll back even if a
version exists.

Cherry-pick #36551
2024-07-10 14:25:44 +08:00
7b74b199a5 [fix](memory) Fix LRU cache deleter and memory tracking (#32080)
In order to add common code to the value deleter of LRU cache, let all lru cache values inherit from LRUCacheValueBase class and tracking memory in destructor.
2024-03-15 17:57:58 +08:00
5e4674ab66 [fix](partial update) mishandling of exceptions in the publish phase may result in data loss (#30366) 2024-01-27 09:09:02 +08:00
4b4fd1a290 [improvement](log) add txn log (#28875) 2024-01-16 18:37:06 +08:00
7c7dbf15bc [feature](merge-cloud) Decouple Tablet/TabletManager/TxnManager from global StorageEngine instance (#29736) 2024-01-12 11:57:16 +08:00
f40cce1406 [Fix](partition) Skip rowset partition id eq 0 smaller than config wh… (#29510) 2024-01-05 19:39:51 +08:00
82635d4b59 [opt](memory) All LRU Cache inherit from LRUCachePolicy (#28940)
After all LRU Cache inherits from LRUCachePolicy, this will allow prune stale entry, eviction when memory exceeds limit, and define common properties. LRUCache constructor change to private, only allow LRUCachePolicy to construct it.

Impl DummyLRUCache, when LRU Cache capacity is 0, will no longer be meaningless insert and evict.
2023-12-29 16:15:56 +08:00
aab859be56 [enhance](partition_id) check partition id before store meta (#28055) 2023-12-19 21:31:41 +08:00
ad8faedac4 [fix](txn_manager) Fix wrong use of std::map::erase in TxnManager::delete_txn #28507 2023-12-16 14:50:46 +08:00
a719d7a222 [fix](memory) Fix LRU Cache of type NUMBER charge (#28175) 2023-12-13 11:15:57 +08:00
7e82e7651a [Improve](txn) Add some fuzzy test stub in txn (#26712) 2023-11-16 11:50:06 +08:00
d767804815 [feature](merge-cloud) Decouple rowset id generator and local rowsets gc implementation (#25921) 2023-11-10 10:07:02 +08:00
d0960bac56 [Fix](partial update) Fix partial update info loss when the delete bitmaps of the committed transactions are calculated by the compaction (#26556)
a fix for #25147
2023-11-08 19:56:31 +08:00
2cc68381ec [feature](binlog) Add ingest_binlog/http_get_snapshot limit download speed && Add async ingest_binlog (#26323) 2023-11-06 11:14:44 +08:00
0068783e88 [fix](merge-on-write) change some static_cast<void> to RETURN_IF_ERROR (#25863) 2023-10-25 11:23:06 +08:00
9c9fc84f39 [feature](merge-cloud) Abstract BaseTablet for CloudTablet (#24929) 2023-10-18 20:29:04 +08:00
1514f78b87 [refactor](partial-update) Split partial update infos from tablet schema (#25147) 2023-10-17 14:21:40 +08:00
cda8fb6b8b [fix](load) return Status when error in RowsetWriter::build (#25381) 2023-10-17 09:40:23 +08:00
73c3e3ab55 [Feature](x-load) support config min replica num for loading data (#21118) 2023-10-11 21:07:35 +08:00
642e5cdb69 [Fix](Status) Make Status [[nodiscard]] and handle returned Status correctly (#23395) 2023-09-29 22:38:52 +08:00
ee98cea8a1 [improve](segment-cache) Change the segment cache granularity from rowset_id to rowset_id+segment_id (#23561) 2023-09-05 14:32:07 +08:00
da9eb79ac4 [Enhancement](Schema hash) Remove schema hash in tablet info (#23516) 2023-08-29 10:05:12 +08:00
d4694167a8 [Enhancement](chore) Some Status relevant enhancement (#23072) 2023-08-21 14:14:38 +08:00
cf368728be [fix](merge-on-write) Fix a typo and remove useless member rowset in CommitTabletTxnInfo (#23151)
Fix a typo in #23078
2023-08-18 14:14:34 +08:00
1d1077c3b6 [bugfix](fd) Recycle the segment file fds directly when delete stale rowset (#22705) 2023-08-09 14:45:56 +08:00
f0d08da97c [enhancement](merge-on-write) split delete bitmap from tablet meta (#21456) 2023-07-12 19:13:36 +08:00
Pxl
ca71048f7f [Chore](status) avoid empty error msg on status (#21454)
avoid empty error msg on status
2023-07-11 13:48:16 +08:00
7d4c47e250 [Enhancement](Compaction) Caculate all committed rowsets delete bitmaps when do comapction (#20907)
Here we will calculate all the rowsets delete bitmaps which are committed but not published to reduce the calculation pressure of publish phase.

Step1: collect this tablet's all committed rowsets' delete bitmaps.

Step2: calculate all rowsets' delete bitmaps which are published during compaction.

Step3: write back updated delete bitmap and tablet info.
2023-07-10 14:06:11 +08:00
67afea73b1 [enhancement](merge-on-write) add more version and txn information for mow publish (#21257) 2023-07-07 16:18:47 +08:00
21b30820fd [fix](partial-update) fix a coredump in commit_phase_update_delete_bitmap (#21254) 2023-06-28 11:47:07 +08:00
ce9a20a375 [enhancement](merge-on-write) format logs about MoW and add more stats for publish (#20853) 2023-06-17 23:14:28 +08:00
b97537b04b [Fix](MOW) Fix load data publish timeout when enable unique key MOW (#20720) 2023-06-14 17:56:02 +08:00
24fb05ec83 [Bug](row-store) Fix row store with materialize index (#20356)
If a query hits a materialized view that has row storage enabled, but the row storage column is not present in the materialized view, it will result in a query crash. Therefore, it is necessary to include the row storage column when creating the materialized view, and serialize the row storage column during the execution of SchemaChange.
2023-06-08 10:55:22 +08:00
625a8bcb05 [fix](merge-on-write) fix that set_txn_related_delete_bitmap may coredump (#20300) 2023-06-06 17:49:01 +08:00
aae04d9680 [Chore](log) Remove some verbose log && Change log level (#20236) 2023-05-31 09:15:01 +08:00
cc20c430f6 [fix](partial update) use correct tablet schema for rowset writer in publish task (#20117) 2023-05-29 16:57:18 +08:00
93933308e6 [Feature-WIP](CCR): Add ccr doris interface (WIP) (#17881) 2023-05-26 23:40:49 +08:00
86ba0ebf42 [fix](mow) revert 17147 and 18750 (#19583) 2023-05-13 08:43:36 +08:00
e08de52ee7 [chore](compile) using PCH for compilation acceleration under clang (#19303) 2023-05-08 19:51:06 +08:00
aef9355cd3 [feature-wip](partial update) PART1: support basic partial write (#17542) 2023-04-28 17:17:57 +08:00
95d91e7010 [bugfix](txn_manager) use write lock to protect txn_tablet_map (#19161) 2023-04-27 20:21:20 +08:00
8b27d42b9b [bugfix](MOW) fix core in set_txn_related_delete_bitmap (#18956)
Fe will clear transaction info when transaction timeout, but calc delete bitmap
related logic in DeltaWriter::close_wait will continue. In set_txn_related_delete_bitmap,
we return directly in such case.
2023-04-25 10:57:26 +08:00
e412dd12e8 [chore](build) Use include-what-you-use to optimize includes (PART II) (#18761)
Currently, there are some useless includes in the codebase. We can use a tool named include-what-you-use to optimize these includes. By using a strict include-what-you-use policy, we can get lots of benefits from it.
2023-04-19 23:11:48 +08:00
7ac7d35703 [bugfix](publish) fix TabletLoadInfo may released by delete txn (#17986) 2023-03-24 20:14:34 +08:00
0334cde2b1 [fix](merge-on-write) when if publish and be down, need recalc delete bitmap for MoW (#17617)
* (merge-on-write) when if publish and be down, need recalc delete bitmap for MoW

Signed-off-by: nextdreamblue <zxw520blue1@163.com>

* fix code

Signed-off-by: nextdreamblue <zxw520blue1@163.com>

---------

Signed-off-by: nextdreamblue <zxw520blue1@163.com>
2023-03-10 07:55:00 +08:00
00723e36cf [enhancement](merge-on-write) add delete bitmap correctness check for single load (#17147)
For Unique Key MoW table, if there are duplicate keys in one single load job and there's multiple segments, we need to calculate delete bitmap to mark these duplicate keys deleted.
Add a check here to detect any bugs that might cause duplicate keys.
2023-02-28 10:06:36 +08:00
4522aeb74a [improvement](MOW) use shared_lock when get load info in publish txn (#16874) 2023-02-21 10:14:40 +08:00
f3aea7f0f0 [Enhancement](status) Unify error code and enable customed err msg for BE internal errors (#14744) 2022-12-11 23:33:18 +08:00
721d418a2f [feature-wip](unique-key-merge-on-write) fix that version is awlays 0 when update delete bitmap (#12044) 2022-08-26 09:41:55 +08:00
60fddd56e7 [feature-wip](unique-key-merge-on-write) opt lock and only save valid delete_bitmap (#11953)
1. use rlock in most logic instead of wrlock
2. filter stale rowset's delete bitmap in save meta
3. add a delete_bitmap lock to handle compaction and publish_txn confict

Co-authored-by: yixiutt <yixiu@selectdb.com>
2022-08-23 14:43:40 +08:00