Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 641055 Details for
Bug 872696
QMF queue events do not propagate to HA backups
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Quick patch to prevent duplicate output tasks
bz872696.patch (text/plain), 1.81 KB, created by
Jason Dillaman
on 2012-11-08 19:47:04 UTC
(
hide
)
Description:
Quick patch to prevent duplicate output tasks
Filename:
MIME Type:
Creator:
Jason Dillaman
Created:
2012-11-08 19:47:04 UTC
Size:
1.81 KB
patch
obsolete
>diff --git a/qpid/cpp/src/qpid/sys/AggregateOutput.cpp b/qpid/cpp/src/qpid/sys/AggregateOutput.cpp >index fc95f46..2133634 100644 >--- a/qpid/cpp/src/qpid/sys/AggregateOutput.cpp >+++ b/qpid/cpp/src/qpid/sys/AggregateOutput.cpp >@@ -61,6 +61,8 @@ bool AggregateOutput::doOutput() { > if (didOutput) { > tasks.push_back(t); > return true; >+ } else { >+ taskSet.erase(t); > } > } > return false; >@@ -68,19 +70,24 @@ bool AggregateOutput::doOutput() { > > void AggregateOutput::addOutputTask(OutputTask* task) { > Mutex::ScopedLock l(lock); >- tasks.push_back(task); >+ if (taskSet.insert(task).second) { >+ tasks.push_back(task); >+ } > } > > void AggregateOutput::removeOutputTask(OutputTask* task) { > Mutex::ScopedLock l(lock); > while (busy) lock.wait(); >- tasks.erase(std::remove(tasks.begin(), tasks.end(), task), tasks.end()); >+ if (taskSet.erase(task) > 0) { >+ tasks.erase(std::remove(tasks.begin(), tasks.end(), task), tasks.end()); >+ } > } > > void AggregateOutput::removeAll() > { > Mutex::ScopedLock l(lock); > while (busy) lock.wait(); >+ taskSet.clear(); > tasks.clear(); > } > >diff --git a/qpid/cpp/src/qpid/sys/AggregateOutput.h b/qpid/cpp/src/qpid/sys/AggregateOutput.h >index d7c0ff2..802722a 100644 >--- a/qpid/cpp/src/qpid/sys/AggregateOutput.h >+++ b/qpid/cpp/src/qpid/sys/AggregateOutput.h >@@ -28,6 +28,7 @@ > > #include <algorithm> > #include <deque> >+#include <set> > > namespace qpid { > namespace sys { >@@ -44,9 +45,11 @@ namespace sys { > class QPID_COMMON_CLASS_EXTERN AggregateOutput : public OutputTask, public OutputControl > { > typedef std::deque<OutputTask*> TaskList; >+ typedef std::set<OutputTask*> TaskSet; > > Monitor lock; > TaskList tasks; >+ TaskSet taskSet; > bool busy; > OutputControl& control; > >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 872696
:
641055
|
641080