diff options
author | Samuel Just <sam.just@inktank.com> | 2013-08-26 23:19:45 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2013-09-06 16:05:53 -0700 |
commit | 40dc489351383c2e35b91c3d4e76b633309716df (patch) | |
tree | e119c9b87b9f49680df6e2b1d15fd5bff4462568 | |
parent | 4261eb5ec105b9c27605360910602dc367fd79f5 (diff) | |
download | ceph-40dc489351383c2e35b91c3d4e76b633309716df.tar.gz |
PGLog: move the log size check after the early return
There really are stl implementations (like the one on my ubuntu 12.04
machine) which have a list::size() which is linear in the size of the
list. That assert, therefore, is quite expensive!
Fixes: #6040
Backport: Dumpling
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit fe68b15a3d82349f8941f5b9f70fcbb5d4bc7f97)
-rw-r--r-- | src/osd/PGLog.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osd/PGLog.h b/src/osd/PGLog.h index 552f9b0cee9..712c1e1c917 100644 --- a/src/osd/PGLog.h +++ b/src/osd/PGLog.h @@ -205,11 +205,11 @@ protected: log_keys_debug->erase(i++)); } void check() { - assert(log.log.size() == log_keys_debug.size()); if (cct && !(cct->_conf->osd_debug_pg_log_writeout)) { return; } + assert(log.log.size() == log_keys_debug.size()); for (list<pg_log_entry_t>::iterator i = log.log.begin(); i != log.log.end(); ++i) { |