You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Ken Giusti (Created) (JIRA)" <ji...@apache.org> on 2011/12/07 16:10:39 UTC
[jira] [Created] (QPID-3666) QMF v1 method requests may fail if new
object's id overlaps an old deleted object.
QMF v1 method requests may fail if new object's id overlaps an old deleted object.
----------------------------------------------------------------------------------
Key: QPID-3666
URL: https://issues.apache.org/jira/browse/QPID-3666
Project: Qpid
Issue Type: Bug
Components: C++ Broker
Affects Versions: 0.14
Reporter: Ken Giusti
Assignee: Ken Giusti
Priority: Minor
Fix For: 0.15
If a broker object, such as a queue, is created, deleted, and re-created, the new(est) QMF management object is still indexed by the old key value. This is OK for QMF v2 keys, but v1 keys contain a sequence number which is not correctly updated. This may result in v1 queries for the new object to fail.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
[jira] [Commented] (QPID-3666) QMF v1 method requests may fail if
new object's id overlaps an old deleted object.
Posted by "Ken Giusti (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/QPID-3666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13164451#comment-13164451 ]
Ken Giusti commented on QPID-3666:
----------------------------------
Proposed fix:
Index: cpp/src/qpid/management/ManagementAgent.cpp
===================================================================
--- cpp/src/qpid/management/ManagementAgent.cpp (revision 1211460)
+++ cpp/src/qpid/management/ManagementAgent.cpp (working copy)
@@ -684,7 +684,7 @@
ManagementObjectMap::iterator destIter = managementObjects.find(oid);
if (destIter != managementObjects.end()) {
// duplicate found. It is OK if the old object has been marked
- // deleted...
+ // deleted, just replace the old with the new.
ManagementObject *oldObj = destIter->second;
if (oldObj->isDeleted()) {
DeletedObject::shared_ptr dptr(new DeletedObject(oldObj, qmf1Support, qmf2Support));
@@ -696,6 +696,10 @@
// and complain loudly...
QPID_LOG(error, "Detected two management objects with the same identifier: " << oid);
}
+ // QPID-3666: be sure to replace the -index- also, as non-key members of
+ // the index object may be different for the new object! So erase the
+ // entry, rather than []= assign here:
+ managementObjects.erase(destIter);
}
managementObjects[oid] = object;
}
> QMF v1 method requests may fail if new object's id overlaps an old deleted object.
> ----------------------------------------------------------------------------------
>
> Key: QPID-3666
> URL: https://issues.apache.org/jira/browse/QPID-3666
> Project: Qpid
> Issue Type: Bug
> Components: C++ Broker
> Affects Versions: 0.14
> Reporter: Ken Giusti
> Assignee: Ken Giusti
> Priority: Minor
> Fix For: 0.15
>
>
> If a broker object, such as a queue, is created, deleted, and re-created, the new(est) QMF management object is still indexed by the old key value. This is OK for QMF v2 keys, but v1 keys contain a sequence number which is not correctly updated. This may result in v1 queries for the new object to fail.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
[jira] [Resolved] (QPID-3666) QMF v1 method requests may fail if
new object's id overlaps an old deleted object.
Posted by "Ken Giusti (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/QPID-3666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ken Giusti resolved QPID-3666.
------------------------------
Resolution: Fixed
> QMF v1 method requests may fail if new object's id overlaps an old deleted object.
> ----------------------------------------------------------------------------------
>
> Key: QPID-3666
> URL: https://issues.apache.org/jira/browse/QPID-3666
> Project: Qpid
> Issue Type: Bug
> Components: C++ Broker
> Affects Versions: 0.14
> Reporter: Ken Giusti
> Assignee: Ken Giusti
> Priority: Minor
> Fix For: 0.15
>
>
> If a broker object, such as a queue, is created, deleted, and re-created, the new(est) QMF management object is still indexed by the old key value. This is OK for QMF v2 keys, but v1 keys contain a sequence number which is not correctly updated. This may result in v1 queries for the new object to fail.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
[jira] [Commented] (QPID-3666) QMF v1 method requests may fail if
new object's id overlaps an old deleted object.
Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/QPID-3666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13164453#comment-13164453 ]
jiraposter@reviews.apache.org commented on QPID-3666:
-----------------------------------------------------
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3052/
-----------------------------------------------------------
Review request for qpid and Ted Ross.
Summary
-------
Not very pretty, but seems to be the correct solution.
This addresses bug qpid-3666.
https://issues.apache.org/jira/browse/qpid-3666
Diffs
-----
/trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp 1211460
Diff: https://reviews.apache.org/r/3052/diff
Testing
-------
unit.
Thanks,
Kenneth
> QMF v1 method requests may fail if new object's id overlaps an old deleted object.
> ----------------------------------------------------------------------------------
>
> Key: QPID-3666
> URL: https://issues.apache.org/jira/browse/QPID-3666
> Project: Qpid
> Issue Type: Bug
> Components: C++ Broker
> Affects Versions: 0.14
> Reporter: Ken Giusti
> Assignee: Ken Giusti
> Priority: Minor
> Fix For: 0.15
>
>
> If a broker object, such as a queue, is created, deleted, and re-created, the new(est) QMF management object is still indexed by the old key value. This is OK for QMF v2 keys, but v1 keys contain a sequence number which is not correctly updated. This may result in v1 queries for the new object to fail.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org