Skip to content

Commit

Permalink
msgr: add ms_die_on_bad_msg option, make assert(0) conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
liewegas committed Aug 24, 2009
1 parent f6f1263 commit 5d9d1ef
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion RELEASE_CHECKLIST
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
- add entry to debian/changelog, with proper version
- commit
- git tag version
- make dist, upload to ceph.newdream.net:ceph.newdream.net/downloads
- build debs for amd64, i386
- make dist, upload to ceph.newdream.net:ceph.newdream.net/downloads
- email ml + post news entry

- rebase kclient_clean
1 change: 1 addition & 0 deletions src/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ static struct config_option config_optionsp[] = {
OPTION(ms_fail_interval, 0, OPT_DOUBLE, 15.0), // fail after this long
OPTION(ms_die_on_failure, 0, OPT_BOOL, false),
OPTION(ms_nocrc, 0, OPT_BOOL, false),
OPTION(ms_die_on_bad_msg, 0, OPT_BOOL, false),
OPTION(mon_data, 0, OPT_STR, ""),
OPTION(mon_tick_interval, 0, OPT_INT, 5),
OPTION(mon_osd_down_out_interval, 0, OPT_INT, 300), // seconds
Expand Down
1 change: 1 addition & 0 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ struct md_config_t {
double ms_fail_interval;
bool ms_die_on_failure;
bool ms_nocrc;
bool ms_die_on_bad_msg;

// mon
const char *mon_data;
Expand Down
3 changes: 2 additions & 1 deletion src/msg/Message.cc
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,8 @@ Message *decode_message(ceph_msg_header& header, ceph_msg_footer& footer,
catch (buffer::error *e) {
dout(0) << "failed to decode message of type " << type << ": " << *e << dendl;
delete e;
assert(0);
if (g_conf.ms_die_on_bad_msg)
assert(0);
return 0;
}

Expand Down

0 comments on commit 5d9d1ef

Please sign in to comment.