Skip to content

Commit

Permalink
scylla-gdb: Bring scylla netw back to work
Browse files Browse the repository at this point in the history
The netw command tries to access the netw::_the_messaging_service that
was removed long ago. The correct place for the messaging service is
in debug:: namespace.

The scylla-gdb test checks that, but the netw command sees that the ptr
in question is not initialized, thinks it's not yet sharded::start()-ed
and exits without errors.

tests: unit(gdb)

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
Message-Id: <20210624135107.12375-1-xemul@scylladb.com>
  • Loading branch information
xemul authored and avikivity committed Jun 24, 2021
1 parent 4d7f55a commit 3552e99
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 0 additions & 2 deletions message/messaging_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,6 @@ struct messaging_service::rpc_protocol_server_wrapper : public rpc_protocol::ser

constexpr int32_t messaging_service::current_version;

distributed<messaging_service> _the_messaging_service;

bool operator==(const msg_addr& x, const msg_addr& y) noexcept {
// Ignore cpu id for now since we do not really support shard to shard connections
return x.addr == y.addr;
Expand Down
4 changes: 2 additions & 2 deletions scylla-gdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -3372,9 +3372,9 @@ def __init__(self):
gdb.Command.__init__(self, 'scylla netw', gdb.COMMAND_USER, gdb.COMPLETE_NONE, True)

def invoke(self, arg, for_tty):
mss = sharded(gdb.parse_and_eval('netw::_the_messaging_service'))
mss = sharded(gdb.parse_and_eval('debug::the_messaging_service'))
if not mss.instances:
gdb.write('netw::_the_messaging_service does not exist (yet?)\n')
gdb.write('debug::the_messaging_service does not exist (yet?)\n')
return

ms = mss.local()
Expand Down
1 change: 0 additions & 1 deletion test/scylla-gdb/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def dos(cmd, known_broken=False):
# dos('lsa-segment ???')
dos('ptr $schema')

# no messaging service yet, but still:
dos('netw')

# probably empty:
Expand Down

0 comments on commit 3552e99

Please sign in to comment.