@@ -40,8 +40,6 @@ void ArchiveWriter::open(ArchiveWriterOption const& option) {
40
40
std::string array_dict_path = m_archive_path + constants::cArchiveArrayDictFile;
41
41
m_array_dict = std::make_shared<LogTypeDictionaryWriter>();
42
42
m_array_dict->open (array_dict_path, m_compression_level, UINT64_MAX);
43
-
44
- m_timestamp_dict = std::make_shared<TimestampDictionaryWriter>();
45
43
}
46
44
47
45
void ArchiveWriter::close () {
@@ -90,6 +88,7 @@ void ArchiveWriter::close() {
90
88
m_id_to_schema_writer.clear ();
91
89
m_schema_tree.clear ();
92
90
m_schema_map.clear ();
91
+ m_timestamp_dict.clear ();
93
92
m_encoded_message_size = 0UL ;
94
93
m_uncompressed_size = 0UL ;
95
94
m_compressed_size = 0UL ;
@@ -101,7 +100,7 @@ size_t ArchiveWriter::write_timestamp_dict() {
101
100
ZstdCompressor timestamp_dict_compressor;
102
101
timestamp_dict_file_writer.open (timestamp_dict_path, FileWriter::OpenMode::CreateForWriting);
103
102
timestamp_dict_compressor.open (timestamp_dict_file_writer, m_compression_level);
104
- m_timestamp_dict-> write (timestamp_dict_compressor);
103
+ m_timestamp_dict. write (timestamp_dict_compressor);
105
104
timestamp_dict_compressor.close ();
106
105
auto compressed_size = timestamp_dict_file_writer.get_pos ();
107
106
timestamp_dict_file_writer.close ();
@@ -152,7 +151,7 @@ void ArchiveWriter::write_archive_metadata(
152
151
153
152
// Write timestamp dictionary
154
153
compressor.write_numeric_value (ArchiveMetadataPacketType::TimestampDictionary);
155
- m_timestamp_dict-> write (compressor);
154
+ m_timestamp_dict. write (compressor);
156
155
157
156
compressor.close ();
158
157
}
@@ -388,8 +387,8 @@ void ArchiveWriter::update_metadata_db() {
388
387
metadata.increment_static_compressed_size (m_compressed_size);
389
388
metadata.increment_static_uncompressed_size (m_uncompressed_size);
390
389
metadata.expand_time_range (
391
- m_timestamp_dict-> get_begin_timestamp (),
392
- m_timestamp_dict-> get_end_timestamp ()
390
+ m_timestamp_dict. get_begin_timestamp (),
391
+ m_timestamp_dict. get_end_timestamp ()
393
392
);
394
393
395
394
m_metadata_db->add_archive (m_id, metadata);
0 commit comments