Skip to content

Commit

Permalink
[#13022]DST: Compilation errors on gcc11
Browse files Browse the repository at this point in the history
Summary:
Commit 675d486 introduced compilation error on gcc11. This
diff fixes them. The following errors were noticed:

```
/-------------------------------------------------------------------------------
[2022-07-21T06:22:35.385Z] | COMPILATION FAILED
[2022-07-21T06:22:35.385Z] |-------------------------------------------------------------------------------
[2022-07-21T06:22:35.385Z] ent/src/yb/master/restore_sys_catalog_state.cc:282:5: error: multi-line comment [-Werror=comment]
[2022-07-21T06:22:35.385Z]   282 |     //                               /   \
[2022-07-21T06:22:35.385Z]       |     ^
[2022-07-21T06:22:35.385Z] ent/src/yb/master/restore_sys_catalog_state.cc:284:5: error: multi-line comment [-Werror=comment]
[2022-07-21T06:22:35.385Z]   284 |     //                              / \    /  \
[2022-07-21T06:22:35.385Z]       |     ^
[2022-07-21T06:22:35.385Z] cc1plus: all warnings being treated as errors
[2022-07-21T06:22:35.385Z]
[2022-07-21T06:22:35.385Z] Input files:
[2022-07-21T06:22:35.385Z]   src/yb/master/CMakeFiles/master.dir/__/__/__/ent/src/yb/master/restore_sys_catalog_state.cc.o
[2022-07-21T06:22:35.385Z]   ent/src/yb/master/restore_sys_catalog_state.cc
[2022-07-21T06:22:35.385Z] Output file (from -o): src/yb/master/CMakeFiles/master.dir/__/__/__/ent/src/yb/master/restore_sys_catalog_state.cc.o
[2022-07-21T06:22:35.385Z] \-------------------------------------------------------------------------------
```

```
/-------------------------------------------------------------------------------
[2022-07-21T06:22:25.963Z] | COMPILATION FAILED
[2022-07-21T06:22:25.963Z] |-------------------------------------------------------------------------------
[2022-07-21T06:22:25.963Z] src/yb/master/master_snapshot_coordinator.cc: In member function 'yb::Status yb::master::MasterSnapshotCoordinator::Impl::RestoreSysCatalogReplicated(int64_t, const yb::tablet::SnapshotOperation&, yb::Status*)':
[2022-07-21T06:22:25.963Z] src/yb/master/master_snapshot_coordinator.cc:466:5: error: missing initializer for member 'yb::master::SnapshotScheduleRestoration::non_system_tablets_to_restore' [-Werror=missing-field-initializers]
[2022-07-21T06:22:25.963Z]   466 |     });
[2022-07-21T06:22:25.963Z]       |     ^
[2022-07-21T06:22:25.963Z] cc1plus: all warnings being treated as errors
[2022-07-21T06:22:25.963Z]
[2022-07-21T06:22:25.963Z] Input files:
[2022-07-21T06:22:25.963Z]   src/yb/master/CMakeFiles/master.dir/master_snapshot_coordinator.cc.o
[2022-07-21T06:22:25.963Z]   src/yb/master/master_snapshot_coordinator.cc
[2022-07-21T06:22:25.963Z] Output file (from -o): src/yb/master/CMakeFiles/master.dir/master_snapshot_coordinator.cc.o
[2022-07-21T06:22:25.963Z] \-------------------------------------------------------------------------------
```

Test Plan: Jenkins

Reviewers: asrivastava

Reviewed By: asrivastava

Subscribers: jason, zyu, ybase, bogdan

Differential Revision: https://phabricator.dev.yugabyte.com/D18482
  • Loading branch information
sanketkedia committed Jul 22, 2022
1 parent 47feade commit 25e488d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ent/src/yb/master/restore_sys_catalog_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,12 @@ Status RestoreSysCatalogState::PatchAndAddRestoringTablets() {
// Some examples:
//
// Example#1: Non-colocated split tablet that has finished split completely as of restore time
// t1
// / \
// t11 t12 <-- Restoring time
// / \ / \
// t111 t112 t121 t122 <-- Present time
/* t1
/ \
t11 t12 <-- Restoring time
/ \ / \
t111 t112 t121 t122 <-- Present time
*/
// If we are restoring to a state when t1 was completely split into t11 and t12 then
// in the restoring state, the split map will contain two entries
// one each for t11 and t12. Both the entries will only have the parent
Expand Down
1 change: 1 addition & 0 deletions ent/src/yb/master/restore_sys_catalog_state_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ TEST(RestoreSysCatalogStateTest, Filter) {
.non_system_objects_to_restore = {},
.existing_system_tables = {},
.restoring_system_tables = {},
.non_system_tablets_to_restore = {},
};
RestoreSysCatalogState state(&restoration);
SysNamespaceEntryPB namespace_entry;
Expand Down
1 change: 1 addition & 0 deletions src/yb/master/master_snapshot_coordinator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ class MasterSnapshotCoordinator::Impl {
.non_system_objects_to_restore = {},
.existing_system_tables = {},
.restoring_system_tables = {},
.non_system_tablets_to_restore = {},
});
{
std::lock_guard<std::mutex> lock(mutex_);
Expand Down

0 comments on commit 25e488d

Please sign in to comment.