summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoah Watkins <noahwatkins@gmail.com>2013-10-31 00:34:29 +0100
committerSage Weil <sage@inktank.com>2013-11-02 00:02:15 +0100
commit4402898390a9d9c8cb296ea05ac7c75f2c32a528 (patch)
tree146396c8cab9a2fb1df84394d982fb880cd0a8f5
parentPGLog: remove obsolete assert in merge_log (diff)
downloadceph-4402898390a9d9c8cb296ea05ac7c75f2c32a528.tar.xz
ceph-4402898390a9d9c8cb296ea05ac7c75f2c32a528.zip
prio-q: initialize cur iterator
For new SubQueues `cur` is not intialized, so front/pop_front will freak out. I honestly I have no idea how this hasn't been seen, but it was being triggered frequently on OSX. Fixes: #6686 Signed-off-by: Noah Watkins <noahwatkins@gmail.com> Reviewed-by: Samuel Just <sam.just@inktank.com>
-rw-r--r--src/common/PrioritizedQueue.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/PrioritizedQueue.h b/src/common/PrioritizedQueue.h
index 6dcb519da40..e663f277693 100644
--- a/src/common/PrioritizedQueue.h
+++ b/src/common/PrioritizedQueue.h
@@ -92,7 +92,7 @@ class PrioritizedQueue {
SubQueue()
: tokens(0),
max_tokens(0),
- size(0) {}
+ size(0), cur(q.begin()) {}
void set_max_tokens(unsigned mt) {
max_tokens = mt;
}