Skip to content

Commit

Permalink
[#17993] docdb: Fix build failure due to a51a66d
Browse files Browse the repository at this point in the history
Summary:
Fix compile error from a51a66d due to problematic merge
(`yb::IsDebug()` changed to `yb::kIsDebug` in master but commit adds new use of `yb::IsDebug()`):

```
  /-------------------------------------------------------------------------------
  | COMPILATION FAILED
  |-------------------------------------------------------------------------------
  In file included from /opt/yb-build/thirdparty/yugabyte-db-thirdparty-v20240417035947-ac36057f7c-almalinux8-x86_64-gcc11/installed/uninstrumented/include/glog/logging.h:86,
                   from ../../src/yb/util/logging.h:51,
                   from ../../src/yb/util/status_log.h:16,
                   from ../../src/yb/util/status.h:305,
                   from ../../src/yb/util/result.h:23,
                   from ../../src/yb/util/enums.h:32,
                   from ../../src/yb/util/stack_trace_tracker.h:18,
                   from ../../src/yb/util/stack_trace_tracker.cc:13:
  ../../src/yb/util/stack_trace_tracker.cc:28:45: error: 'IsDebug' is not a member of 'yb'; did you mean 'kIsDebug'?
     28 | DEFINE_RUNTIME_bool(track_stack_traces, yb::IsDebug(), "Whether to enable stack trace tracking");
        |                                             ^~~~~~~
  ../../src/yb/util/flags/flag_tags.h:240:3: note: in expansion of macro '_DEFINE_flag'
    240 |   _DEFINE_flag(bool, name, default_value, description); \
        |   ^~~~~~~~~~~~
  ../../src/yb/util/stack_trace_tracker.cc:28:1: note: in expansion of macro 'DEFINE_RUNTIME_bool'
     28 | DEFINE_RUNTIME_bool(track_stack_traces, yb::IsDebug(), "Whether to enable stack trace tracking");
        | ^~~~~~~~~~~~~~~~~~~
  ../../src/yb/util/stack_trace_tracker.cc:28:45: error: 'IsDebug' is not a member of 'yb'; did you mean 'kIsDebug'?
     28 | DEFINE_RUNTIME_bool(track_stack_traces, yb::IsDebug(), "Whether to enable stack trace tracking");
        |                                             ^~~~~~~
  ../../src/yb/util/flags/flag_tags.h:240:3: note: in expansion of macro '_DEFINE_flag'
    240 |   _DEFINE_flag(bool, name, default_value, description); \
        |   ^~~~~~~~~~~~
  ../../src/yb/util/stack_trace_tracker.cc:28:1: note: in expansion of macro 'DEFINE_RUNTIME_bool'
     28 | DEFINE_RUNTIME_bool(track_stack_traces, yb::IsDebug(), "Whether to enable stack trace tracking");
        | ^~~~~~~~~~~~~~~~~~~
```
Jira: DB-7054

Test Plan: Jenkins: urgent, compile only

Reviewers: asrivastava

Reviewed By: asrivastava

Subscribers: ybase

Differential Revision: https://phorge.dev.yugabyte.com/D34804
  • Loading branch information
es1024 committed May 7, 2024
1 parent a51a66d commit 0721464
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/yb/util/stack_trace_tracker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
#include "yb/gutil/thread_annotations.h"

#include "yb/util/atomic.h"
#include "yb/util/debug-util.h"
#include "yb/util/debug.h"
#include "yb/util/flags.h"
#include "yb/util/stack_trace.h"
#include "yb/util/unique_lock.h"

DEFINE_RUNTIME_bool(track_stack_traces, yb::IsDebug(), "Whether to enable stack trace tracking");
DEFINE_RUNTIME_bool(track_stack_traces, yb::kIsDebug, "Whether to enable stack trace tracking");

namespace yb {

Expand Down

0 comments on commit 0721464

Please sign in to comment.