Skip to content

Commit 2a1b929

Browse files
committed
remove implicit root add
1 parent 1899c61 commit 2a1b929

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

components/core/src/clp_s/JsonParser.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,8 @@ int JsonParser::get_archive_node_id(
578578
return map_location->second;
579579
}
580580
auto& curr_node = ir_tree.get_node(ir_node_id);
581-
int32_t parent_node_id{0};
582-
if (0 != curr_node.get_parent_id()) {
581+
int32_t parent_node_id{-1};
582+
if (ir_node_id != curr_node.get_parent_id()) {
583583
parent_node_id = get_archive_node_id(
584584
ir_node_to_archive_node_map,
585585
curr_node.get_parent_id(),
@@ -695,7 +695,7 @@ void JsonParser::parse_kv_log_event(
695695

696696
bool JsonParser::parse_from_IR() {
697697
std::map<std::tuple<int32_t, NodeType>, int32_t> ir_node_to_archive_node_map;
698-
m_archive_writer->add_node(-1, NodeType::Unknown, "root");
698+
//m_archive_writer->add_node(-1, NodeType::Unknown, "root");
699699

700700
for (auto& file_path : m_file_paths) {
701701
int fsize = std::filesystem::file_size(file_path);
@@ -733,7 +733,7 @@ bool JsonParser::parse_from_IR() {
733733
m_num_messages++;
734734
if (m_archive_writer->get_data_size() >= m_target_encoded_size) {
735735
ir_node_to_archive_node_map.clear();
736-
m_archive_writer->add_node(-1, NodeType::Unknown, "root");
736+
//m_archive_writer->add_node(-1, NodeType::Unknown, "root");
737737
split_archive();
738738
}
739739

components/core/src/clp_s/JsonParser.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class JsonParser {
8686

8787
/**
8888
* Parses the Key Value IR Stream and stores the data in the archive.
89-
* @return whether the IR Stream was parsed succesfully
89+
* @return whether the IR Stream was parsed successfully
9090
*/
9191
[[nodiscard]] bool parse_from_IR();
9292

0 commit comments

Comments
 (0)