Coverage Report

Created: 2026-05-09 09:50

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/storage/rowset/rowset_meta.h
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#ifndef DORIS_BE_SRC_OLAP_ROWSET_ROWSET_META_H
19
#define DORIS_BE_SRC_OLAP_ROWSET_ROWSET_META_H
20
21
#include <gen_cpp/olap_file.pb.h>
22
#include <glog/logging.h>
23
24
#include <atomic>
25
#include <chrono>
26
#include <cstdint>
27
#include <memory>
28
#include <string>
29
#include <vector>
30
31
#include "common/cast_set.h"
32
#include "common/config.h"
33
#include "common/status.h"
34
#include "io/fs/encrypted_fs_factory.h"
35
#include "io/fs/file_system.h"
36
#include "runtime/memory/lru_cache_policy.h"
37
#include "storage/metadata_adder.h"
38
#include "storage/olap_common.h"
39
#include "storage/rowset/rowset_fwd.h"
40
#include "storage/storage_policy.h"
41
#include "storage/tablet/tablet_fwd.h"
42
#include "util/once.h"
43
44
namespace doris {
45
46
class RowsetMeta : public MetadataAdder<RowsetMeta> {
47
public:
48
911k
    RowsetMeta() = default;
49
    ~RowsetMeta();
50
51
    bool init(std::string_view pb_rowset_meta);
52
53
    bool init(const RowsetMeta* rowset_meta);
54
55
    bool init_from_pb(const RowsetMetaPB& rowset_meta_pb);
56
57
    bool init_from_json(const std::string& json_rowset_meta);
58
59
0
    bool serialize(std::string* value) { return _serialize_to_pb(value); }
60
61
    bool json_rowset_meta(std::string* json_rowset_meta);
62
63
    // If the rowset is a local rowset, return the global local file system.
64
    // Otherwise, return the remote file system corresponding to rowset's resource id.
65
    // Note that if the resource id cannot be found for the corresponding remote file system, nullptr will be returned.
66
    MOCK_FUNCTION io::FileSystemSPtr fs();
67
68
    io::FileSystemSPtr physical_fs();
69
70
    Result<const StorageResource*> remote_storage_resource();
71
72
    void set_remote_storage_resource(StorageResource resource);
73
74
30.0k
    const std::string& resource_id() const { return _rowset_meta_pb.resource_id(); }
75
76
1.76k
    void set_resource_id(const std::string& resource_id) {
77
1.76k
        _rowset_meta_pb.set_resource_id(resource_id);
78
1.76k
    }
79
80
42.4M
    bool is_local() const { return !_rowset_meta_pb.has_resource_id(); }
81
82
    bool has_variant_type_in_schema() const;
83
84
28.7M
    RowsetId rowset_id() const { return _rowset_id; }
85
86
232k
    void set_rowset_id(const RowsetId& rowset_id) {
87
        // rowset id is a required field, just set it to 0
88
232k
        _rowset_meta_pb.set_rowset_id(0);
89
232k
        _rowset_id = rowset_id;
90
232k
        _rowset_meta_pb.set_rowset_id_v2(rowset_id.to_string());
91
232k
    }
92
93
5.90M
    int64_t tablet_id() const { return _rowset_meta_pb.tablet_id(); }
94
95
232k
    void set_tablet_id(int64_t tablet_id) { _rowset_meta_pb.set_tablet_id(tablet_id); }
96
97
    int64_t index_id() const { return _rowset_meta_pb.index_id(); }
98
99
220k
    void set_index_id(int64_t index_id) { _rowset_meta_pb.set_index_id(index_id); }
100
101
37.8k
    TabletUid tablet_uid() const { return _rowset_meta_pb.tablet_uid(); }
102
103
38.1k
    void set_tablet_uid(TabletUid tablet_uid) {
104
38.1k
        *(_rowset_meta_pb.mutable_tablet_uid()) = tablet_uid.to_proto();
105
38.1k
    }
106
107
662k
    int64_t txn_id() const { return _rowset_meta_pb.txn_id(); }
108
109
209k
    void set_txn_id(int64_t txn_id) { _rowset_meta_pb.set_txn_id(txn_id); }
110
111
2.32k
    int32_t tablet_schema_hash() const { return _rowset_meta_pb.tablet_schema_hash(); }
112
113
221k
    void set_tablet_schema_hash(int32_t tablet_schema_hash) {
114
221k
        _rowset_meta_pb.set_tablet_schema_hash(tablet_schema_hash);
115
221k
    }
116
117
2
    void mark_row_binlog() { _rowset_meta_pb.set_is_row_binlog(true); }
118
119
483k
    bool is_row_binlog() const {
120
483k
        return _rowset_meta_pb.has_is_row_binlog() && _rowset_meta_pb.is_row_binlog();
121
483k
    }
122
123
1.95M
    RowsetTypePB rowset_type() const { return _rowset_meta_pb.rowset_type(); }
124
125
222k
    void set_rowset_type(RowsetTypePB rowset_type) { _rowset_meta_pb.set_rowset_type(rowset_type); }
126
127
568k
    RowsetStatePB rowset_state() const { return _rowset_meta_pb.rowset_state(); }
128
129
461k
    void set_rowset_state(RowsetStatePB rowset_state) {
130
461k
        _rowset_meta_pb.set_rowset_state(rowset_state);
131
461k
    }
132
133
51.9M
    Version version() const {
134
51.9M
        return {_rowset_meta_pb.start_version(), _rowset_meta_pb.end_version()};
135
51.9M
    }
136
137
277k
    void set_version(Version version) {
138
277k
        _rowset_meta_pb.set_start_version(version.first);
139
277k
        _rowset_meta_pb.set_end_version(version.second);
140
277k
    }
141
142
989k
    bool has_version() const {
143
989k
        return _rowset_meta_pb.has_start_version() && _rowset_meta_pb.has_end_version();
144
989k
    }
145
146
7.62M
    int64_t start_version() const { return _rowset_meta_pb.start_version(); }
147
148
8.89M
    int64_t end_version() const { return _rowset_meta_pb.end_version(); }
149
150
12.3M
    int64_t num_rows() const { return _rowset_meta_pb.num_rows(); }
151
152
248k
    void set_num_rows(int64_t num_rows) { _rowset_meta_pb.set_num_rows(num_rows); }
153
154
243k
    void set_num_segment_rows(const std::vector<uint32_t>& num_segment_rows) {
155
243k
        _rowset_meta_pb.mutable_num_segment_rows()->Assign(num_segment_rows.cbegin(),
156
243k
                                                           num_segment_rows.cend());
157
243k
    }
158
159
4.17k
    void get_num_segment_rows(std::vector<uint32_t>* num_segment_rows) const {
160
4.17k
        num_segment_rows->assign(_rowset_meta_pb.num_segment_rows().cbegin(),
161
4.17k
                                 _rowset_meta_pb.num_segment_rows().cend());
162
4.17k
    }
163
164
158k
    auto& get_num_segment_rows() const { return _rowset_meta_pb.num_segment_rows(); }
165
166
11.1M
    int64_t total_disk_size() const { return _rowset_meta_pb.total_disk_size(); }
167
168
259k
    void set_total_disk_size(int64_t total_disk_size) {
169
259k
        _rowset_meta_pb.set_total_disk_size(total_disk_size);
170
259k
    }
171
172
8.79M
    int64_t data_disk_size() const { return _rowset_meta_pb.data_disk_size(); }
173
174
248k
    void set_data_disk_size(int64_t data_disk_size) {
175
248k
        _rowset_meta_pb.set_data_disk_size(data_disk_size);
176
248k
    }
177
178
2.34M
    int64_t index_disk_size() const { return _rowset_meta_pb.index_disk_size(); }
179
180
248k
    void set_index_disk_size(int64_t index_disk_size) {
181
248k
        _rowset_meta_pb.set_index_disk_size(index_disk_size);
182
248k
    }
183
184
0
    void zone_maps(std::vector<ZoneMap>* zone_maps) {
185
0
        for (const ZoneMap& zone_map : _rowset_meta_pb.zone_maps()) {
186
0
            zone_maps->push_back(zone_map);
187
0
        }
188
0
    }
189
190
0
    void set_zone_maps(const std::vector<ZoneMap>& zone_maps) {
191
0
        for (const ZoneMap& zone_map : zone_maps) {
192
0
            ZoneMap* new_zone_map = _rowset_meta_pb.add_zone_maps();
193
0
            *new_zone_map = zone_map;
194
0
        }
195
0
    }
196
197
0
    void add_zone_map(const ZoneMap& zone_map) {
198
0
        ZoneMap* new_zone_map = _rowset_meta_pb.add_zone_maps();
199
0
        *new_zone_map = zone_map;
200
0
    }
201
202
7.06M
    bool has_delete_predicate() const { return _rowset_meta_pb.has_delete_predicate(); }
203
204
8.10k
    const DeletePredicatePB& delete_predicate() const { return _rowset_meta_pb.delete_predicate(); }
205
206
22
    DeletePredicatePB* mutable_delete_predicate() {
207
22
        return _rowset_meta_pb.mutable_delete_predicate();
208
22
    }
209
210
3.23k
    void set_delete_predicate(DeletePredicatePB delete_predicate) {
211
3.23k
        DeletePredicatePB* new_delete_condition = _rowset_meta_pb.mutable_delete_predicate();
212
3.23k
        *new_delete_condition = std::move(delete_predicate);
213
3.23k
    }
214
215
9.88k
    bool empty() const { return _rowset_meta_pb.empty(); }
216
217
245k
    void set_empty(bool empty) { _rowset_meta_pb.set_empty(empty); }
218
219
70
    PUniqueId load_id() const { return _rowset_meta_pb.load_id(); }
220
221
192k
    void set_load_id(PUniqueId load_id) {
222
192k
        PUniqueId* new_load_id = _rowset_meta_pb.mutable_load_id();
223
192k
        new_load_id->set_hi(load_id.hi());
224
192k
        new_load_id->set_lo(load_id.lo());
225
192k
    }
226
227
195k
    void set_job_id(const std::string& job_id) { _rowset_meta_pb.set_job_id(job_id); }
228
229
0
    const std::string& job_id() const { return _rowset_meta_pb.job_id(); }
230
231
0
    bool delete_flag() const { return _rowset_meta_pb.delete_flag(); }
232
233
139k
    int64_t creation_time() const { return _rowset_meta_pb.creation_time(); }
234
235
260k
    void set_creation_time(int64_t creation_time) {
236
260k
        return _rowset_meta_pb.set_creation_time(creation_time);
237
260k
    }
238
239
410k
    int64_t stale_at() const {
240
410k
        int64_t stale_time = _stale_at_s.load();
241
410k
        return stale_time > 0 ? stale_time : _rowset_meta_pb.creation_time();
242
410k
    }
243
244
8.44k
    bool has_stale_at() const { return _stale_at_s.load() > 0; }
245
246
72.7k
    void set_stale_at(int64_t stale_at) { _stale_at_s.store(stale_at); }
247
248
2.87k
    int64_t partition_id() const { return _rowset_meta_pb.partition_id(); }
249
250
221k
    void set_partition_id(int64_t partition_id) {
251
221k
        return _rowset_meta_pb.set_partition_id(partition_id);
252
221k
    }
253
254
33.7M
    int64_t num_segments() const { return _rowset_meta_pb.num_segments(); }
255
256
252k
    void set_num_segments(int64_t num_segments) { _rowset_meta_pb.set_num_segments(num_segments); }
257
258
    // Convert to RowsetMetaPB, skip_schema is only used by cloud to separate schema from rowset meta.
259
    void to_rowset_pb(RowsetMetaPB* rs_meta_pb, bool skip_schema = false) const;
260
261
    // Convert to RowsetMetaPB, skip_schema is only used by cloud to separate schema from rowset meta.
262
    RowsetMetaPB get_rowset_pb(bool skip_schema = false) const;
263
264
0
    inline DeletePredicatePB* mutable_delete_pred_pb() {
265
0
        return _rowset_meta_pb.mutable_delete_predicate();
266
0
    }
267
268
1.57k
    bool is_singleton_delta() const {
269
1.57k
        return has_version() && _rowset_meta_pb.start_version() == _rowset_meta_pb.end_version();
270
1.57k
    }
271
272
    // Some time, we may check if this rowset is in rowset meta manager's meta by using RowsetMetaManager::check_rowset_meta.
273
    // But, this check behavior may cost a lot of time when it is frequent.
274
    // If we explicitly remove this rowset from rowset meta manager's meta, we can set _is_removed_from_rowset_meta to true,
275
    // And next time when we want to check if this rowset is in rowset mata manager's meta, we can
276
    // check is_remove_from_rowset_meta() first.
277
21.4k
    void set_remove_from_rowset_meta() { _is_removed_from_rowset_meta = true; }
278
279
22.3k
    bool is_remove_from_rowset_meta() const { return _is_removed_from_rowset_meta; }
280
281
37.3k
    SegmentsOverlapPB segments_overlap() const { return _rowset_meta_pb.segments_overlap_pb(); }
282
283
311k
    void set_segments_overlap(SegmentsOverlapPB segments_overlap) {
284
311k
        _rowset_meta_pb.set_segments_overlap_pb(segments_overlap);
285
311k
    }
286
287
778k
    static bool comparator(const RowsetMetaSharedPtr& left, const RowsetMetaSharedPtr& right) {
288
778k
        return left->end_version() < right->end_version();
289
778k
    }
290
291
    // return true if segments in this rowset has overlapping data.
292
    // this is not same as `segments_overlap()` method.
293
    // `segments_overlap()` only return the value of "segments_overlap" field in rowset meta,
294
    // but "segments_overlap" may be UNKNOWN.
295
    //
296
    // Returns true if all of the following conditions are met
297
    // 1. the rowset contains more than one segment
298
    // 2. the rowset's start version == end version (non-singleton rowset was generated by compaction process
299
    //    which always produces non-overlapped segments)
300
    // 3. segments_overlap() flag is not NONOVERLAPPING (OVERLAP_UNKNOWN and OVERLAPPING are OK)
301
5.72M
    bool is_segments_overlapping() const {
302
5.72M
        return num_segments() > 1 && is_singleton_delta() && segments_overlap() != NONOVERLAPPING;
303
5.72M
    }
304
305
41
    bool produced_by_compaction() const {
306
41
        return has_version() &&
307
41
               (start_version() < end_version() ||
308
41
                (start_version() == end_version() && segments_overlap() == NONOVERLAPPING));
309
41
    }
310
311
    // get the compaction score of this rowset.
312
    // if segments are overlapping, the score equals to the number of segments,
313
    // otherwise, score is 1.
314
2.45M
    uint32_t get_compaction_score() const {
315
2.45M
        uint32_t score = 0;
316
2.45M
        if (!is_segments_overlapping()) {
317
2.45M
            score = 1;
318
2.45M
        } else {
319
305
            auto num_seg = num_segments();
320
305
            DCHECK_GT(num_seg, 0);
321
305
            score = cast_set<uint32_t>(num_seg);
322
305
            CHECK(score > 0);
323
305
        }
324
2.45M
        return score;
325
2.45M
    }
326
327
61.4k
    uint32_t get_merge_way_num() const {
328
61.4k
        uint32_t way_num = 0;
329
61.7k
        if (!is_segments_overlapping()) {
330
61.7k
            if (num_segments() == 0) {
331
35.8k
                way_num = 0;
332
35.8k
            } else {
333
25.8k
                way_num = 1;
334
25.8k
            }
335
18.4E
        } else {
336
18.4E
            auto num_seg = num_segments();
337
18.4E
            DCHECK_GT(num_seg, 0);
338
339
18.4E
            way_num = cast_set<uint32_t>(num_seg);
340
18.4E
            CHECK(way_num > 0);
341
18.4E
        }
342
61.4k
        return way_num;
343
61.4k
    }
344
345
4.10M
    void get_segments_key_bounds(std::vector<KeyBoundsPB>* segments_key_bounds) const {
346
4.10M
        for (const KeyBoundsPB& key_range : _rowset_meta_pb.segments_key_bounds()) {
347
3.92M
            segments_key_bounds->push_back(key_range);
348
3.92M
        }
349
4.10M
    }
350
351
3.57k
    auto& get_segments_key_bounds() const { return _rowset_meta_pb.segments_key_bounds(); }
352
353
5.47M
    bool is_segments_key_bounds_truncated() const {
354
5.47M
        return _rowset_meta_pb.has_segments_key_bounds_truncated() &&
355
5.47M
               _rowset_meta_pb.segments_key_bounds_truncated();
356
5.47M
    }
357
358
248k
    void set_segments_key_bounds_truncated(bool truncated) {
359
248k
        _rowset_meta_pb.set_segments_key_bounds_truncated(truncated);
360
248k
    }
361
362
    // When true, `segments_key_bounds` holds a single aggregated
363
    // [rowset_min, rowset_max] entry instead of per-segment bounds.
364
4.10M
    bool is_segments_key_bounds_aggregated() const {
365
4.10M
        return _rowset_meta_pb.has_segments_key_bounds_aggregated() &&
366
4.10M
               _rowset_meta_pb.segments_key_bounds_aggregated();
367
4.10M
    }
368
369
243k
    void set_segments_key_bounds_aggregated(bool aggregated) {
370
243k
        _rowset_meta_pb.set_segments_key_bounds_aggregated(aggregated);
371
243k
    }
372
373
1.41M
    bool get_first_segment_key_bound(KeyBoundsPB* key_bounds) {
374
        // for compatibility, old version has not segment key bounds
375
1.41M
        if (_rowset_meta_pb.segments_key_bounds_size() == 0) {
376
0
            return false;
377
0
        }
378
1.41M
        *key_bounds = *_rowset_meta_pb.segments_key_bounds().begin();
379
1.41M
        return true;
380
1.41M
    }
381
382
965k
    bool get_last_segment_key_bound(KeyBoundsPB* key_bounds) {
383
965k
        if (_rowset_meta_pb.segments_key_bounds_size() == 0) {
384
0
            return false;
385
0
        }
386
965k
        *key_bounds = *_rowset_meta_pb.segments_key_bounds().rbegin();
387
965k
        return true;
388
965k
    }
389
390
    // If `aggregate_into_single` is true, collapse per-segment bounds into a single
391
    // [rowset_min, rowset_max] entry and mark this rowset as aggregated.
392
    void set_segments_key_bounds(const std::vector<KeyBoundsPB>& segments_key_bounds,
393
                                 bool aggregate_into_single = false);
394
395
19
    void add_segment_key_bounds(KeyBoundsPB segments_key_bounds) {
396
19
        *_rowset_meta_pb.add_segments_key_bounds() = std::move(segments_key_bounds);
397
19
        set_segments_overlap(OVERLAPPING);
398
19
    }
399
400
224k
    void set_newest_write_timestamp(int64_t timestamp) {
401
224k
        _rowset_meta_pb.set_newest_write_timestamp(timestamp);
402
224k
    }
403
404
438k
    int64_t newest_write_timestamp() const { return _rowset_meta_pb.newest_write_timestamp(); }
405
406
    // for cloud only
407
395
    bool has_visible_ts_ms() const { return _rowset_meta_pb.has_visible_ts_ms(); }
408
388
    int64_t visible_ts_ms() const { return _rowset_meta_pb.visible_ts_ms(); }
409
395
    std::chrono::time_point<std::chrono::system_clock> visible_timestamp() const {
410
395
        using namespace std::chrono;
411
395
        if (has_visible_ts_ms()) {
412
388
            return time_point<system_clock>(milliseconds(visible_ts_ms()));
413
388
        }
414
7
        return system_clock::from_time_t(newest_write_timestamp());
415
395
    }
416
171k
    void set_visible_ts_ms(int64_t visible_ts_ms) {
417
171k
        _rowset_meta_pb.set_visible_ts_ms(visible_ts_ms);
418
171k
    }
419
420
    void set_tablet_schema(const TabletSchemaSPtr& tablet_schema);
421
    void set_tablet_schema(const TabletSchemaPB& tablet_schema);
422
423
5.97M
    const TabletSchemaSPtr& tablet_schema() const { return _schema; }
424
425
192k
    void set_txn_expiration(int64_t expiration) { _rowset_meta_pb.set_txn_expiration(expiration); }
426
427
193k
    void set_compaction_level(int64_t compaction_level) {
428
193k
        _rowset_meta_pb.set_compaction_level(compaction_level);
429
193k
    }
430
431
5.19k
    int64_t compaction_level() { return _rowset_meta_pb.compaction_level(); }
432
433
    // `seg_file_size` MUST ordered by segment id
434
    void add_segments_file_size(const std::vector<size_t>& seg_file_size);
435
436
    // Return -1 if segment file size is unknown
437
    int64_t segment_file_size(int seg_id) const;
438
439
3.28k
    const auto& segments_file_size() const { return _rowset_meta_pb.segments_file_size(); }
440
441
    // Used for partial update, when publish, partial update may add a new rowset and we should update rowset meta
442
    void merge_rowset_meta(const RowsetMeta& other);
443
444
    InvertedIndexFileInfo inverted_index_file_info(int seg_id);
445
446
193
    const auto& inverted_index_file_info() const {
447
193
        return _rowset_meta_pb.inverted_index_file_info();
448
193
    }
449
450
    void add_inverted_index_files_info(
451
            const std::vector<const InvertedIndexFileInfo*>& idx_file_info);
452
453
    int64_t get_metadata_size() const override;
454
455
    // Because the member field '_handle' is a raw pointer, use member func 'init' to replace copy ctor
456
    RowsetMeta(const RowsetMeta&) = delete;
457
    RowsetMeta operator=(const RowsetMeta&) = delete;
458
459
    void add_packed_slice_location(const std::string& segment_path,
460
                                   const std::string& packed_file_path, int64_t offset,
461
0
                                   int64_t size, int64_t packed_file_size) {
462
0
        auto* index_map = _rowset_meta_pb.mutable_packed_slice_locations();
463
0
        auto& index_pb = (*index_map)[segment_path];
464
0
        index_pb.set_packed_file_path(packed_file_path);
465
0
        index_pb.set_offset(offset);
466
0
        index_pb.set_size(size);
467
0
        index_pb.set_packed_file_size(packed_file_size);
468
0
    }
469
470
10.2k
    int32_t schema_version() const { return _rowset_meta_pb.schema_version(); }
471
472
0
    std::string debug_string() const { return _rowset_meta_pb.ShortDebugString(); }
473
474
    // Pre-set the encryption algorithm to avoid re-entrant get_tablet calls
475
    // that can cause SingleFlight deadlock during tablet loading.
476
170k
    void set_encryption_algorithm(EncryptionAlgorithmPB algorithm) {
477
170k
        _determine_encryption_once.call(
478
170k
                [algorithm]() -> Result<EncryptionAlgorithmPB> { return algorithm; });
479
170k
    }
480
481
131k
    int64_t commit_tso() const { return _rowset_meta_pb.commit_tso(); }
482
483
15.8k
    void set_commit_tso(int64_t commit_tso) { _rowset_meta_pb.set_commit_tso(commit_tso); }
484
485
170k
    void set_cloud_fields_after_visible(int64_t visible_version, int64_t version_update_time_ms) {
486
        // Update rowset meta with correct version and visible_ts
487
        // !!ATTENTION!!: this code should be updated if there are more fields
488
        // in rowset meta which will be modified in meta-service when commit_txn in the future
489
170k
        set_version({visible_version, visible_version});
490
170k
        if (version_update_time_ms > 0) {
491
170k
            set_visible_ts_ms(version_update_time_ms);
492
170k
        }
493
170k
    }
494
495
private:
496
    bool _deserialize_from_pb(std::string_view value);
497
498
    bool _serialize_to_pb(std::string* value);
499
500
    void _init();
501
502
    friend bool operator==(const RowsetMeta& a, const RowsetMeta& b);
503
504
0
    friend bool operator!=(const RowsetMeta& a, const RowsetMeta& b) { return !(a == b); }
505
506
private:
507
    RowsetMetaPB _rowset_meta_pb;
508
    TabletSchemaSPtr _schema;
509
    Cache::Handle* _handle = nullptr;
510
    RowsetId _rowset_id;
511
    StorageResource _storage_resource;
512
    bool _is_removed_from_rowset_meta = false;
513
    DorisCallOnce<Result<EncryptionAlgorithmPB>> _determine_encryption_once;
514
    std::atomic<int64_t> _stale_at_s {0};
515
};
516
517
using RowsetMetaMapContainer = std::unordered_map<Version, RowsetMetaSharedPtr, HashOfVersion>;
518
519
} // namespace doris
520
521
#endif // DORIS_BE_SRC_OLAP_ROWSET_ROWSET_META_H