Skip to content

Commit

Permalink
Fix snapshot's making header bug (#362)
Browse files Browse the repository at this point in the history
  • Loading branch information
kangpinghuang authored and morningman committed Nov 28, 2018
1 parent 1ffc294 commit aa27d0e
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions be/src/olap/olap_snapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,15 +377,6 @@ OLAPStatus OLAPEngine::_create_snapshot_files(
header_locked = false;
_update_header_file_info(shortest_versions, new_olap_header);

// save new header
if ((res = OlapHeaderManager::save(store, ref_olap_table->tablet_id(),
ref_olap_table->schema_hash(), new_olap_header)) != OLAP_SUCCESS) {
LOG(WARNING) << "save header error. [table=" << ref_olap_table->full_name()
<< "tablet_id=" << ref_olap_table->full_name()
<< ", schema_hash=" << ref_olap_table->schema_hash();
break;
}

// save new header to snapshot header path
res = new_olap_header->save(header_path);
if (res != OLAP_SUCCESS) {
Expand Down Expand Up @@ -791,8 +782,6 @@ OLAPStatus OLAPEngine::_generate_new_header(
_update_header_file_info(version_entity_vec, new_olap_header);
new_olap_header->set_shard(new_shard);

_update_header_file_info(version_entity_vec, new_olap_header);

res = OlapHeaderManager::save(store, tablet->tablet_id(), tablet->schema_hash(), new_olap_header);
if (res != OLAP_SUCCESS) {
OLAP_LOG_WARNING("fail to save olap header to new db. [res=%d]", res);
Expand Down

0 comments on commit aa27d0e

Please sign in to comment.