)]}'
{"openstack/common/rpc/__init__.py":[{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"172ecac4755617b89932fe14a7521272cb534641","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    cfg.StrOpt(\u0027control_exchange\u0027,"},{"line_number":61,"context_line":"               default\u003d\u0027openstack\u0027,"},{"line_number":62,"context_line":"               help\u003d\u0027AMQP exchange to connect to if using RabbitMQ or Qpid\u0027),"},{"line_number":63,"context_line":"    cfg.BoolOpt(\u0027amqp_rpc_enable_fast_single_reply_queue\u0027,"},{"line_number":64,"context_line":"                default\u003dTrue,"},{"line_number":65,"context_line":"                help\u003d\u0027Enable AMQP based RPC call single reply queue\u0027"},{"line_number":66,"context_line":"                \u0027performance improvement\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2FjJQ%3D","line":63,"updated":"2013-01-16 14:13:44.000000000","message":"How about a better name? \u0027rpc_single_reply_queue\u0027 and the help could be \u0027Enable a fast single reply queue if using RabbitMQ or Qpid\u0027","commit_id":"7dc2d25e5a2bb71071309382277445345c537120"},{"author":{"_account_id":6539,"name":"Raymond Pekowski","email":"pekowski@gmail.com","username":"pekowski"},"change_message_id":"238a1800742e3fc5e6a76f934ec966aad3c01512","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    cfg.StrOpt(\u0027control_exchange\u0027,"},{"line_number":61,"context_line":"               default\u003d\u0027openstack\u0027,"},{"line_number":62,"context_line":"               help\u003d\u0027AMQP exchange to connect to if using RabbitMQ or Qpid\u0027),"},{"line_number":63,"context_line":"    cfg.BoolOpt(\u0027amqp_rpc_enable_fast_single_reply_queue\u0027,"},{"line_number":64,"context_line":"                default\u003dTrue,"},{"line_number":65,"context_line":"                help\u003d\u0027Enable AMQP based RPC call single reply queue\u0027"},{"line_number":66,"context_line":"                \u0027performance improvement\u0027),"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAM3%2F%2Fi%2F4%3D","line":63,"in_reply_to":"AAAAM3%2F%2FjJQ%3D","updated":"2013-01-16 15:53:58.000000000","message":"I wanted the word fast to be in the option, but can live without that.  I don\u0027t think we should remove amqp from the option name though, since it is not applicable to non-amqp based RPC.  As for the help, I like the suggestion, but think perhaps changing \"RabbitMQ or Qpid\" to \"AMQP based RPC\" would be more accurate.  Or even \"AMQP based RPCs like RabbitQM and Qpid\".","commit_id":"7dc2d25e5a2bb71071309382277445345c537120"}],"openstack/common/rpc/amqp.py":[{"author":{"_account_id":6539,"name":"Raymond Pekowski","email":"pekowski@gmail.com","username":"pekowski"},"change_message_id":"fafcc18f47541db476a31fd6b72e87fbbbf52e6f","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                          message_data)"},{"line_number":173,"context_line":"                return"},{"line_number":174,"context_line":"            if self._num_call_waiters \u003d\u003d 1:"},{"line_number":175,"context_line":"                LOG.warn(_(\u0027No reply_id in reply likely due to a downlevel \u0027"},{"line_number":176,"context_line":"                           \u0027callee. The reply is still delivered.\u0027))"},{"line_number":177,"context_line":"                for reply_id in self._call_waiters:"},{"line_number":178,"context_line":"                    waiter \u003d self._call_waiters[reply_id]"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAM3%2F%2FhUc%3D","line":175,"updated":"2013-01-17 15:19:01.000000000","message":"After thinking about it, just because there is only one waiter, does not mean concurrency didn\u0027t occur, so this won\u0027t work.  For example, if there was concurrency with this code, all but the last concurrent request will fail and the last will get routed randomly to one of the waiting callers.  Not good.  I could make it work by adding some concurrency detection flags, but I think it best just to always fail when a call is made to a downlevel callee.  I could also add something to the message that would cause it to fail on the callee, for example change the method key to methodv2.  A downlevel callee wouldn\u0027t even try to execute the call.  This is a bit of a hack, but any thoughts?","commit_id":"39bc9da9066fc6b701beea1ae8c092683009acb5"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"6089cd9bc2eb5ef9bf48fdfbff228729c0d2a3e0","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def _process_data(self, message_data):"},{"line_number":167,"context_line":"        reply_id \u003d message_data.pop(\u0027_reply_id\u0027, None)"},{"line_number":168,"context_line":"        if not reply_id:"},{"line_number":169,"context_line":"            LOG.error(_(\u0027No reply_id in reply likely due to a backlevel \u0027"},{"line_number":170,"context_line":"                        \u0027callee. The reply is discarded : %s\u0027) %"},{"line_number":171,"context_line":"                      message_data)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2FfrA%3D","line":168,"updated":"2013-01-18 15:50:35.000000000","message":"I have two different ideas to address the issue of a null reply_id but I don\u0027t like them :) Anyway I share them with you may be we can find other ideas:\n\n1 -  use the request_id coming from the API as reply_id value. we can do that only if we are sure that each API request which needs just a SINGLE rpc.call from each service to be performed. It seems to me a big and dangerous assumption\n2 - is it possible to change the context and adding the reply_id as a context value? Something like _context_reply_id? It seems to me that _conext_ values are preserved during a rpc.call. \n3 -  Try to create a kind of hash using some unique values going back and forth during a rpc.call...but I didn\u0027t find any good candidate.\n\nwhat do you think?","commit_id":"58967af4726f03e100258a62c3be7f6ba0ac886a"},{"author":{"_account_id":6539,"name":"Raymond Pekowski","email":"pekowski@gmail.com","username":"pekowski"},"change_message_id":"13c42cbb308c8504b86081bcb07d8b307bb69720","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def _process_data(self, message_data):"},{"line_number":167,"context_line":"        reply_id \u003d message_data.pop(\u0027_reply_id\u0027, None)"},{"line_number":168,"context_line":"        if not reply_id:"},{"line_number":169,"context_line":"            LOG.error(_(\u0027No reply_id in reply likely due to a backlevel \u0027"},{"line_number":170,"context_line":"                        \u0027callee. The reply is discarded : %s\u0027) %"},{"line_number":171,"context_line":"                      message_data)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2Fdvw%3D","line":168,"in_reply_to":"AAAAM3%2F%2FeEo%3D","updated":"2013-01-21 16:09:04.000000000","message":"Two comments: (1) perhaps to ease the acceptance, I should change the default on enabling this performance improvement from True to False.  Hopefully, others will weigh in on this, particularly some lead or the approver. (2) I considered taking advantage of the AMQP features you mention, but rejected the idea, because the ability to set them is not part of the Qpid API.  It would only work with RabbitMQ.  Good thoughts.","commit_id":"58967af4726f03e100258a62c3be7f6ba0ac886a"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"95f78dc77f0d7e3770902cce07ec16e660cd3bed","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def _process_data(self, message_data):"},{"line_number":167,"context_line":"        reply_id \u003d message_data.pop(\u0027_reply_id\u0027, None)"},{"line_number":168,"context_line":"        if not reply_id:"},{"line_number":169,"context_line":"            LOG.error(_(\u0027No reply_id in reply likely due to a backlevel \u0027"},{"line_number":170,"context_line":"                        \u0027callee. The reply is discarded : %s\u0027) %"},{"line_number":171,"context_line":"                      message_data)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2FeEo%3D","line":168,"in_reply_to":"AAAAM3%2F%2FfmE%3D","updated":"2013-01-21 11:03:48.000000000","message":"Your solution to be compatible it works but I can see that they rejected it.\nI am trying to understand if we could have some advantages if we use the \"reply-to\" and \"correlation-id\" properties for the (AMQP) message instead of saving those values in the message body.","commit_id":"58967af4726f03e100258a62c3be7f6ba0ac886a"},{"author":{"_account_id":6539,"name":"Raymond Pekowski","email":"pekowski@gmail.com","username":"pekowski"},"change_message_id":"bf7522d9c8dd204f965fbbe806e232b712a78897","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def _process_data(self, message_data):"},{"line_number":167,"context_line":"        reply_id \u003d message_data.pop(\u0027_reply_id\u0027, None)"},{"line_number":168,"context_line":"        if not reply_id:"},{"line_number":169,"context_line":"            LOG.error(_(\u0027No reply_id in reply likely due to a backlevel \u0027"},{"line_number":170,"context_line":"                        \u0027callee. The reply is discarded : %s\u0027) %"},{"line_number":171,"context_line":"                      message_data)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2FfmE%3D","line":168,"in_reply_to":"AAAAM3%2F%2FfrA%3D","updated":"2013-01-18 17:00:45.000000000","message":"Commenting on each idea:\n1- I thought about using the context request_id, but it appears to be related to authentication and anyway found that there is no enforcement of a unique value for it per RPC call.  If there was any concurrent RPC calls using the same context, there would be no way to uniquely identify them.\n2 - This would be an awesome idea if the context were returned on the reply, but it is not.\n3 - A good try, but replies are very skimpy.  Here are some examples:\n{\"failure\": null, \"result\": [42]}\n{\"failure\": null, \"result\": null, \"ending\": true}\nI did have this hack of an idea, but rejected it:\nChange the \"method\" keyword to \"methodv2\" for example.  From a read of the code, a downlevel callee replies with an error and a result containing a string having \u0027No method for message: \" and the original request.  The uplevel caller could look for this and reissue the request using the downlevel way.  Downlevel calls would be slower, but would work.","commit_id":"58967af4726f03e100258a62c3be7f6ba0ac886a"},{"author":{"_account_id":159,"name":"Eric Windisch","email":"ewindisch@docker.com","username":"ewindisch"},"change_message_id":"86b3210feb8bc8e867c85d51cbe276e4ebc5a2ee","unresolved":false,"context_lines":[{"line_number":488,"context_line":"    LOG.debug(_(\u0027MSG_ID is %s\u0027) % (msg_id))"},{"line_number":489,"context_line":"    pack_context(msg, context)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"    if not conf.amqp_rpc_single_reply_queue:"},{"line_number":492,"context_line":"        conn \u003d ConnectionContext(conf, connection_pool)"},{"line_number":493,"context_line":"        wait_msg \u003d MulticallWaiter(conf, conn, timeout)"},{"line_number":494,"context_line":"        conn.declare_direct_consumer(msg_id, wait_msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2FcL4%3D","line":491,"updated":"2013-01-22 15:24:05.000000000","message":"At the cost of performance, this code could wait on MulticallWaiter AND MulticallProxyWaiter. Wrap both in a greenthread and use an eventlet.event.Event() channel to get wait_msg.\n\nWhen you receive wait_msg, kill the threads.\n\nThe new conf_var could be a backwards-compatibility-toggle, which when disabled, only performs the newer, faster method.\n\nThoughts?","commit_id":"58967af4726f03e100258a62c3be7f6ba0ac886a"},{"author":{"_account_id":6539,"name":"Raymond Pekowski","email":"pekowski@gmail.com","username":"pekowski"},"change_message_id":"8595782571a0fa77bac9e3254a4fcab97bd00b90","unresolved":false,"context_lines":[{"line_number":488,"context_line":"    LOG.debug(_(\u0027MSG_ID is %s\u0027) % (msg_id))"},{"line_number":489,"context_line":"    pack_context(msg, context)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"    if not conf.amqp_rpc_single_reply_queue:"},{"line_number":492,"context_line":"        conn \u003d ConnectionContext(conf, connection_pool)"},{"line_number":493,"context_line":"        wait_msg \u003d MulticallWaiter(conf, conn, timeout)"},{"line_number":494,"context_line":"        conn.declare_direct_consumer(msg_id, wait_msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2FZyY%3D","line":491,"in_reply_to":"AAAAM3%2F%2FaR8%3D","updated":"2013-01-23 21:42:12.000000000","message":"I must admit I am no message queuing export, so I really don\u0027t know the tradeoffs between topic and direct.  And it looks like I was mixing things up when I mentioned \"durable\". Openstack allows the exchanges and queues of a TopicConsumer to be optionally set to durable, defaulting non-durable, in the Kombu implementation. It\u0027s not clear to me how that works for Qpid. What I meant was \"auto_delete\".  The current implementation defines TopicConsumer exchanges and queues with auto_delete\u003dFalse and DirectConsumer exchanges and queues with auto_delete\u003dTrue.  Of course we could modify the code to create a TopicConsumer with auto_delete\u003dTrue, but that would require changes to impl_kombu.py and perhaps impl_qpid.py.  The problem I was identifying is more of an effort problem due to the amount of code change, which isn\u0027t really a good argument.  Getting to your idea of using routing keys, from a quick google search, I find that when using a routing key, although it does allow a single exchange to be used, it requires a different queue per routing key.  Maybe I got that wrong, but if that is correct, then we don\u0027t get the benefit of a single reply queue using different routing keys.  I also shy away from changes that hit code I don\u0027t understand very well and the AMQP protocol is in that category.","commit_id":"58967af4726f03e100258a62c3be7f6ba0ac886a"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"0e886da059b878d722d7962dfabe0052bb1252ae","unresolved":false,"context_lines":[{"line_number":488,"context_line":"    LOG.debug(_(\u0027MSG_ID is %s\u0027) % (msg_id))"},{"line_number":489,"context_line":"    pack_context(msg, context)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"    if not conf.amqp_rpc_single_reply_queue:"},{"line_number":492,"context_line":"        conn \u003d ConnectionContext(conf, connection_pool)"},{"line_number":493,"context_line":"        wait_msg \u003d MulticallWaiter(conf, conn, timeout)"},{"line_number":494,"context_line":"        conn.declare_direct_consumer(msg_id, wait_msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2FaR8%3D","line":491,"in_reply_to":"AAAAM3%2F%2FaaI%3D","updated":"2013-01-23 16:47:03.000000000","message":"You\u0027re right we don\u0027t need Topic consumer but I don\u0027t get your point about the durable queues AFAIK the queues declared by TopicConsumer depends on the durable config parameter, is that correct?\nThe idea to have a Topic consumer is because in my opinion (but I can be wrong) could give us more flexibility in the future. A topic exchange is a generalization of a Direct Consumer, i.e. a topic without \"#\" or \"*\"  characters is behave like a direct one. My feeling is that if the original implementation of the rpc.call was done using topic today we could adopt your change without having this compatibility issue, playing with the routing keys would allow us to detect the right waiter.","commit_id":"58967af4726f03e100258a62c3be7f6ba0ac886a"},{"author":{"_account_id":6539,"name":"Raymond Pekowski","email":"pekowski@gmail.com","username":"pekowski"},"change_message_id":"5152f048f578b7e22d5ee00caef192a08d1855b4","unresolved":false,"context_lines":[{"line_number":488,"context_line":"    LOG.debug(_(\u0027MSG_ID is %s\u0027) % (msg_id))"},{"line_number":489,"context_line":"    pack_context(msg, context)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"    if not conf.amqp_rpc_single_reply_queue:"},{"line_number":492,"context_line":"        conn \u003d ConnectionContext(conf, connection_pool)"},{"line_number":493,"context_line":"        wait_msg \u003d MulticallWaiter(conf, conn, timeout)"},{"line_number":494,"context_line":"        conn.declare_direct_consumer(msg_id, wait_msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2FaaI%3D","line":491,"in_reply_to":"AAAAM3%2F%2Fap4%3D","updated":"2013-01-23 16:04:01.000000000","message":"Interesting thoughts Andrea, especially the idea of sending the ending message to the old queue in the case of a reply from an uplevel callee.  That might break out of the kombu drain_events.  And there might be other ways to get out of it, but I don\u0027t see using a Topic Consumer as any better and actually as having a problem.  Topic Consumers typically create durable queues, which means they survive even when the application that created them terminates.  Since the reply queues are based upon uuids, we would end up with a reply queue leak (a bunch of queues that never get deleted).  There may be ways to handle that, but I don\u0027t see why not just use Direct Consumer.  It could be done by changing the way msg_id and reply_id are used in this patch set and what I think Eric is suggesting.  But I\u0027m thinking Eric may be misunderstanding something about how this patch set works.  I\u0027ll try to clear it up in the general patch set comments.","commit_id":"58967af4726f03e100258a62c3be7f6ba0ac886a"},{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"3aece538d39d09ab64ff1d412dad8716866a1e5e","unresolved":false,"context_lines":[{"line_number":488,"context_line":"    LOG.debug(_(\u0027MSG_ID is %s\u0027) % (msg_id))"},{"line_number":489,"context_line":"    pack_context(msg, context)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"    if not conf.amqp_rpc_single_reply_queue:"},{"line_number":492,"context_line":"        conn \u003d ConnectionContext(conf, connection_pool)"},{"line_number":493,"context_line":"        wait_msg \u003d MulticallWaiter(conf, conn, timeout)"},{"line_number":494,"context_line":"        conn.declare_direct_consumer(msg_id, wait_msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2Fap4%3D","line":491,"in_reply_to":"AAAAM3%2F%2FbEw%3D","updated":"2013-01-23 12:24:10.000000000","message":"if the compatibility mode is enable we could wait on MulticallWaiter and MulticallProxyWaiter and:\nthe single queue is binded to a Topic exchange using msg_id.# as routing_key. In the new way the reply is a TopicPublisher with the routing key msg_id.reply_id.\nif the compatibility mode is enabled we have two cases:\n\n- we got the reply from the TopicConsumer, if the reply_id is there so we send an \u0027ending\u0027 message to the \"old\" queue in order to get it closed. Then we perform the request. If the reply_id is not there we just perform the request.\n\n- if the reply got from the \"old\" DirectConsumer we perform the request and we send an ending message with a proper routing key (msg_id.reply_id) without the reply_id, that is for getting terminated the waiter waiting for the reply in the \"new style\".\n\nDoes that make sense? am I missing anything?","commit_id":"58967af4726f03e100258a62c3be7f6ba0ac886a"},{"author":{"_account_id":6539,"name":"Raymond Pekowski","email":"pekowski@gmail.com","username":"pekowski"},"change_message_id":"bfc4fc4750e74bfaf583ad78df9bae42e66fdb85","unresolved":false,"context_lines":[{"line_number":488,"context_line":"    LOG.debug(_(\u0027MSG_ID is %s\u0027) % (msg_id))"},{"line_number":489,"context_line":"    pack_context(msg, context)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"    if not conf.amqp_rpc_single_reply_queue:"},{"line_number":492,"context_line":"        conn \u003d ConnectionContext(conf, connection_pool)"},{"line_number":493,"context_line":"        wait_msg \u003d MulticallWaiter(conf, conn, timeout)"},{"line_number":494,"context_line":"        conn.declare_direct_consumer(msg_id, wait_msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2FbEw%3D","line":491,"in_reply_to":"AAAAM3%2F%2Fbzs%3D","updated":"2013-01-23 03:00:29.000000000","message":"Eric, I tried to prototype what I think you proposed and the queue created by the MutlicallWaiter does not go away when a message is not received to the queue it creates.  I believe it hangs on Kombu drain_events().  My intention was to show that there would be no performance improvement for doing what you suggest.  I would like to see some performance improvement achievable in Grizzly (or whenever this code gets in), so propose that we simply make the default for amqp_rpc_single_reply_queue \u003d False.  That way it is downlevel compatible by default.","commit_id":"58967af4726f03e100258a62c3be7f6ba0ac886a"},{"author":{"_account_id":159,"name":"Eric Windisch","email":"ewindisch@docker.com","username":"ewindisch"},"change_message_id":"fce84b16b479411f2ecc16982807f34694b18e8b","unresolved":false,"context_lines":[{"line_number":488,"context_line":"    LOG.debug(_(\u0027MSG_ID is %s\u0027) % (msg_id))"},{"line_number":489,"context_line":"    pack_context(msg, context)"},{"line_number":490,"context_line":""},{"line_number":491,"context_line":"    if not conf.amqp_rpc_single_reply_queue:"},{"line_number":492,"context_line":"        conn \u003d ConnectionContext(conf, connection_pool)"},{"line_number":493,"context_line":"        wait_msg \u003d MulticallWaiter(conf, conn, timeout)"},{"line_number":494,"context_line":"        conn.declare_direct_consumer(msg_id, wait_msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAM3%2F%2Fbzs%3D","line":491,"in_reply_to":"AAAAM3%2F%2FcL4%3D","updated":"2013-01-22 17:53:28.000000000","message":"To do this, \u0027msg_id\u0027 would have to continue to be the reply_id (as it is really, right now).  Instead of adding \u0027reply_id\u0027 to messages, add \"reply_channel\" which becomes the new reply topic.","commit_id":"58967af4726f03e100258a62c3be7f6ba0ac886a"},{"author":{"_account_id":6539,"name":"Raymond Pekowski","email":"pekowski@gmail.com","username":"pekowski"},"change_message_id":"0c71d10ee2fe645a5e4be698c67b4287ff00f055","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    def empty(self):"},{"line_number":74,"context_line":"        while self.free_items:"},{"line_number":75,"context_line":"            self.get().close()"},{"line_number":76,"context_line":"        # Force a new connection pool to be created"},{"line_number":77,"context_line":"        self.reply_proxy \u003d None"},{"line_number":78,"context_line":"        self.connection_cls.pool \u003d None"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FMvM%3D","line":76,"updated":"2013-02-03 16:41:24.000000000","message":"Note that these lines were added due to the unit test cases failing without them.  The issue is the above while loop gets all the allocated (created) items in the pool.  If the pool has not been fully populated, then this will be a number less that the pool size.  This empty() call is called by the cleanup() method in this file.  The cleanup() call is made in the unit tests in the tearDown() method between test groupings.  Since items are not returned to the pool each successive test has fewer items it can pull from the pool, a pool leak.  Eventually, the unit tests hang waiting on an item to be returned to the pool.  Outside of the unit tests, in production code you could say, the cleanup() only appears in service.py and only just before doing a sys.exit(), so cleanup() only happens once and the leakage is not a problem.  In any case, this pool leak is fixed by the two added statements below.","commit_id":"ac93eaec113c3b0469b7df591d9efb3eac945545"},{"author":{"_account_id":6539,"name":"Raymond Pekowski","email":"pekowski@gmail.com","username":"pekowski"},"change_message_id":"64d45a913ef6c0730d42d7d4def0b12fe96584c0","unresolved":false,"context_lines":[{"line_number":34,"context_line":"from eventlet import semaphore"},{"line_number":35,"context_line":"from eventlet import queue"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"from openstack.common import cfg"},{"line_number":38,"context_line":"from openstack.common import excutils"},{"line_number":39,"context_line":"from openstack.common.gettextutils import _"},{"line_number":40,"context_line":"from openstack.common import local"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2B4Q4%3D","line":37,"updated":"2013-02-15 18:21:26.000000000","message":"This needs a TODO as well.\n\n \"\"\"TODO(pekowski): Remove this import when the amqp_rpc_single_reply_queue option is removed in Havana.\"\"\"","commit_id":"53d8209511feabd52a63ff564bf594bfa7abba39"},{"author":{"_account_id":6539,"name":"Raymond Pekowski","email":"pekowski@gmail.com","username":"pekowski"},"change_message_id":"64d45a913ef6c0730d42d7d4def0b12fe96584c0","unresolved":false,"context_lines":[{"line_number":41,"context_line":"from openstack.common import log as logging"},{"line_number":42,"context_line":"from openstack.common.rpc import common as rpc_common"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"amqp_opts \u003d ["},{"line_number":45,"context_line":"    cfg.BoolOpt(\u0027amqp_rpc_single_reply_queue\u0027,"},{"line_number":46,"context_line":"                default\u003dFalse,"},{"line_number":47,"context_line":"                help\u003d\u0027Enable a fast single reply queue if using AMQP based \u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2B4RI%3D","line":44,"updated":"2013-02-15 18:21:26.000000000","message":"This needs a TODO as well.\n\n \"\"\"TODO(pekowski): Remove this option in Havana.\"\"\"","commit_id":"53d8209511feabd52a63ff564bf594bfa7abba39"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"a9644c2d1618de561caebec58719bdc9a45007b1","unresolved":false,"context_lines":[{"line_number":56,"context_line":"class Pool(pools.Pool):"},{"line_number":57,"context_line":"    \"\"\"Class that implements a Pool of Connections.\"\"\""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    reply_proxy \u003d None"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def __init__(self, conf, connection_cls, *args, **kwargs):"},{"line_number":62,"context_line":"        self.connection_cls \u003d connection_cls"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2B4nM%3D","line":59,"updated":"2013-02-15 16:27:38.000000000","message":"Since there\u0027s already only a single pool, it seems like this could be simplified to just be an instance variable instead of class variable.  That would remove the need for having to use a semaphore around creating the proxy.","commit_id":"53d8209511feabd52a63ff564bf594bfa7abba39"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"7bfd547160b384b533e554b5bc2207a5fcfe7c58","unresolved":false,"context_lines":[{"line_number":56,"context_line":"class Pool(pools.Pool):"},{"line_number":57,"context_line":"    \"\"\"Class that implements a Pool of Connections.\"\"\""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    reply_proxy \u003d None"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def __init__(self, conf, connection_cls, *args, **kwargs):"},{"line_number":62,"context_line":"        self.connection_cls \u003d connection_cls"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2B34I%3D","line":59,"in_reply_to":"AAAAM3%2F%2B4Ws%3D","updated":"2013-02-15 20:52:16.000000000","message":"Sounds good!","commit_id":"53d8209511feabd52a63ff564bf594bfa7abba39"},{"author":{"_account_id":6539,"name":"Raymond Pekowski","email":"pekowski@gmail.com","username":"pekowski"},"change_message_id":"5693ba4dd8977475dd3785655f8f8db322399251","unresolved":false,"context_lines":[{"line_number":56,"context_line":"class Pool(pools.Pool):"},{"line_number":57,"context_line":"    \"\"\"Class that implements a Pool of Connections.\"\"\""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    reply_proxy \u003d None"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def __init__(self, conf, connection_cls, *args, **kwargs):"},{"line_number":62,"context_line":"        self.connection_cls \u003d connection_cls"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2B4Ws%3D","line":59,"in_reply_to":"AAAAM3%2F%2B4nM%3D","updated":"2013-02-15 18:10:38.000000000","message":"Good catch on the instance variable instead of class variable.  I do think it should be an instance variable.  But our reasoning might differ.  The way I read the get_connection_pool method, there is one pool per connection class, so I should have one ReplyProxy object per connection class.\n\nI am pretty sure that there is only one connection class in use during run time, but the code is written to allow for one per connection class.  Note that connection_pool used to be a global variable (singleton).  My guess as to why it was changed is some future thinking around the unit test cases where both connection pools (kombu and qpid) might exist at the same time, but that is just a guess.\n\nIn an earlier implementation, I created the ReplyProxy object in the __init__() method below.  Then I decided that not all users of RPC would issue RPC calls.  For example, a service may never initiate a call itself.  Since the creation of the ReplyProxy object in turn creates a reply queue, I decided to defer it to the first RPC call.\n\nSince RPC calls could come from multiple threads, I decided I needed a semaphore for the creation of the ReplyProxy object.  I think semaphores in greentrheads are very fast.\n\nSo, I propose that I move the above statement to the __init__ method below.  Do you agree?","commit_id":"53d8209511feabd52a63ff564bf594bfa7abba39"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ae3d817bbb42817008960f640d5c14c266225a33","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            self.get().close()"},{"line_number":76,"context_line":"        # Force a new connection pool to be created"},{"line_number":77,"context_line":"        self.reply_proxy \u003d None"},{"line_number":78,"context_line":"        self.connection_cls.pool \u003d None"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"_pool_create_sem \u003d semaphore.Semaphore()"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2B7%2BI%3D","line":78,"updated":"2013-02-13 21:46:41.000000000","message":"Hi Ray, would you mind adding to your comment above *why* you need a new connection pool to be created when empty() is called.","commit_id":"53d8209511feabd52a63ff564bf594bfa7abba39"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"7bfd547160b384b533e554b5bc2207a5fcfe7c58","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            self.get().close()"},{"line_number":76,"context_line":"        # Force a new connection pool to be created"},{"line_number":77,"context_line":"        self.reply_proxy \u003d None"},{"line_number":78,"context_line":"        self.connection_cls.pool \u003d None"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"_pool_create_sem \u003d semaphore.Semaphore()"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2B34c%3D","line":78,"in_reply_to":"AAAAM3%2F%2B4UM%3D","updated":"2013-02-15 20:52:16.000000000","message":"Let\u0027s leave that as a separate cleanup.  Thanks!","commit_id":"53d8209511feabd52a63ff564bf594bfa7abba39"},{"author":{"_account_id":6539,"name":"Raymond Pekowski","email":"pekowski@gmail.com","username":"pekowski"},"change_message_id":"5693ba4dd8977475dd3785655f8f8db322399251","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            self.get().close()"},{"line_number":76,"context_line":"        # Force a new connection pool to be created"},{"line_number":77,"context_line":"        self.reply_proxy \u003d None"},{"line_number":78,"context_line":"        self.connection_cls.pool \u003d None"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"_pool_create_sem \u003d semaphore.Semaphore()"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2B4UM%3D","line":78,"in_reply_to":"AAAAM3%2F%2B4nU%3D","updated":"2013-02-15 18:10:38.000000000","message":"In a comment to patch set 12, I wrote this:\n\nNote that these lines were added due to the unit test cases failing without them. The issue is the above while loop gets all the allocated (created) items in the pool. If the pool has not been fully populated, then this will be a number less that the pool size. This empty() call is called by the cleanup() method in this file. The cleanup() call is made in the unit tests in the tearDown() method between test groupings. Since items are not returned to the pool each successive test has fewer items it can pull from the pool, a pool leak. Eventually, the unit tests hang waiting on an item to be returned to the pool. Outside of the unit tests, in production code you could say, the cleanup() only appears in service.py and only just before doing a sys.exit(), so cleanup() only happens once and the leakage is not a problem. In any case, this pool leak is fixed by the two added statements below.\n\nI felt that comment was too long to put here, but it seems that I should go ahead and add it.\n\nAnd one more thing I forgot to mention in the above comment:  \"free_items\" is an undocumented instance variable int the eventlet pool class.  You would only know about it from reading the source.  Note that the free_items instance variable is different from the free() pool method.  free_items are the number cached pool items.  The free() method returns the number of cached and non-cached items that can be requested from the pool.  It would be possible for our Pool class to implement the get() method and do the counting ourselves, then call the superclass get to do the real work.  Should I include that in the next patch?  Or should we leave that as a separate bug fix?","commit_id":"53d8209511feabd52a63ff564bf594bfa7abba39"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"d658238a993930b91b93fb2b73bd78a31a718896","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            self.get().close()"},{"line_number":76,"context_line":"        # Force a new connection pool to be created"},{"line_number":77,"context_line":"        self.reply_proxy \u003d None"},{"line_number":78,"context_line":"        self.connection_cls.pool \u003d None"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"_pool_create_sem \u003d semaphore.Semaphore()"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2B4Vo%3D","line":78,"in_reply_to":"AAAAM3%2F%2B4nU%3D","updated":"2013-02-15 17:50:27.000000000","message":"So I did some digging in to this to understand.  The issue is that this code ensures that any pooled connections get closed.  However, the way it works, the pool considers those connections as members of the pool, even though they have been closed and thrown away.  At some point the pool will get \"full\" and no more connections will get created.  So, it makes sense that we want to start over completely after emptying the pool like this, though it only affects testing because in normal operation, this only happens during service shutdown.","commit_id":"53d8209511feabd52a63ff564bf594bfa7abba39"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"a9644c2d1618de561caebec58719bdc9a45007b1","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            self.get().close()"},{"line_number":76,"context_line":"        # Force a new connection pool to be created"},{"line_number":77,"context_line":"        self.reply_proxy \u003d None"},{"line_number":78,"context_line":"        self.connection_cls.pool \u003d None"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"_pool_create_sem \u003d semaphore.Semaphore()"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2B4nU%3D","line":78,"in_reply_to":"AAAAM3%2F%2B4xk%3D","updated":"2013-02-15 16:27:38.000000000","message":"Just removing it causes tests to fail, so I get that it\u0027s needed.  It\u0027s just not immediately obvious why.","commit_id":"53d8209511feabd52a63ff564bf594bfa7abba39"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"ea36fc9e85d6285cd9997e63a0079cb288bb9f92","unresolved":false,"context_lines":[{"line_number":75,"context_line":"            self.get().close()"},{"line_number":76,"context_line":"        # Force a new connection pool to be created"},{"line_number":77,"context_line":"        self.reply_proxy \u003d None"},{"line_number":78,"context_line":"        self.connection_cls.pool \u003d None"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"_pool_create_sem \u003d semaphore.Semaphore()"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2B4xk%3D","line":78,"in_reply_to":"AAAAM3%2F%2B7%2BI%3D","updated":"2013-02-15 15:45:03.000000000","message":"Indeed, I\u0027m curious about this before I +2 ...","commit_id":"53d8209511feabd52a63ff564bf594bfa7abba39"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"a9644c2d1618de561caebec58719bdc9a45007b1","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        self.pool.waitall()"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"class MulticallProxyWaiter(object):"},{"line_number":365,"context_line":"    def __init__(self, conf, msg_id, timeout, connection_pool):"},{"line_number":366,"context_line":"        self._msg_id \u003d msg_id"},{"line_number":367,"context_line":"        self._timeout \u003d timeout or conf.rpc_response_timeout"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2B4nI%3D","line":364,"updated":"2013-02-15 16:27:38.000000000","message":"There\u0027s a lot of duplicated code between this and MulticallWaiter().  It would be nice to DRY this up.","commit_id":"53d8209511feabd52a63ff564bf594bfa7abba39"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"7bfd547160b384b533e554b5bc2207a5fcfe7c58","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        self.pool.waitall()"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"class MulticallProxyWaiter(object):"},{"line_number":365,"context_line":"    def __init__(self, conf, msg_id, timeout, connection_pool):"},{"line_number":366,"context_line":"        self._msg_id \u003d msg_id"},{"line_number":367,"context_line":"        self._timeout \u003d timeout or conf.rpc_response_timeout"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2B34U%3D","line":364,"in_reply_to":"AAAAM3%2F%2B4T8%3D","updated":"2013-02-15 20:52:16.000000000","message":"Oh, good point, if it\u0027s going away in Havana then I\u0027m not as worried about the duplication.  Thanks!","commit_id":"53d8209511feabd52a63ff564bf594bfa7abba39"},{"author":{"_account_id":6539,"name":"Raymond Pekowski","email":"pekowski@gmail.com","username":"pekowski"},"change_message_id":"5693ba4dd8977475dd3785655f8f8db322399251","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        self.pool.waitall()"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"class MulticallProxyWaiter(object):"},{"line_number":365,"context_line":"    def __init__(self, conf, msg_id, timeout, connection_pool):"},{"line_number":366,"context_line":"        self._msg_id \u003d msg_id"},{"line_number":367,"context_line":"        self._timeout \u003d timeout or conf.rpc_response_timeout"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2B4T8%3D","line":364,"in_reply_to":"AAAAM3%2F%2B4nI%3D","updated":"2013-02-15 18:10:38.000000000","message":"Another good catch.  I forgot to add a TODO: to the MulticallWaiter():\n\nTODO(pekowski): Remove MulticallWaiter() in Havana.\n\nWill that satisfy your concern here?","commit_id":"53d8209511feabd52a63ff564bf594bfa7abba39"},{"author":{"_account_id":6539,"name":"Raymond Pekowski","email":"pekowski@gmail.com","username":"pekowski"},"change_message_id":"5693ba4dd8977475dd3785655f8f8db322399251","unresolved":false,"context_lines":[{"line_number":419,"context_line":"            yield result"},{"line_number":420,"context_line":""},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"class MulticallWaiter(object):"},{"line_number":423,"context_line":"    def __init__(self, conf, connection, timeout):"},{"line_number":424,"context_line":"        self._connection \u003d connection"},{"line_number":425,"context_line":"        self._iterator \u003d connection.iterconsume(timeout\u003dtimeout or"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2B4Tw%3D","line":422,"updated":"2013-02-15 18:10:38.000000000","message":"Add this:\n\n    \"\"\"TODO(pekowski): Remove MulticallWaiter() in Havana.\"\"\"","commit_id":"53d8209511feabd52a63ff564bf594bfa7abba39"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"55c2ee36c754116491208a5dace973727123692f","unresolved":false,"context_lines":[{"line_number":433,"context_line":""},{"line_number":434,"context_line":""},{"line_number":435,"context_line":"class MulticallWaiter(object):"},{"line_number":436,"context_line":"    \"\"\"TODO(pekowski): Remove MulticallWaiter() in Havana.\"\"\""},{"line_number":437,"context_line":"    def __init__(self, conf, connection, timeout):"},{"line_number":438,"context_line":"        self._connection \u003d connection"},{"line_number":439,"context_line":"        self._iterator \u003d connection.iterconsume(timeout\u003dtimeout or"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAM3%2F%2B3aE%3D","line":436,"updated":"2013-02-16 01:15:17.000000000","message":"Probably could be a # comment instead of a docstring, but it\u0027s fine :)","commit_id":"52e95f2857e9e2871c973dd7f64748fff22a6ba6"}],"tests/unit/rpc/common.py":[{"author":{"_account_id":1865,"name":"Andrea Rosa","email":"andrea.rosa@gmail.com","username":"andrea-rosa-m"},"change_message_id":"c878fb91ee93eb1f17140ada97d422f3d71e3315","unresolved":false,"context_lines":[{"line_number":362,"context_line":"            f.write(\u0027        \u0027 + str(self.list[1].time) + \u0027\\n\u0027)"},{"line_number":363,"context_line":"            f.write(\u0027        \u0027 + str(self.list[2].time) + \u0027\\n\u0027)"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    def print_wait_states(self):"},{"line_number":366,"context_line":"        with open(\u0027mylog\u0027, \u0027a\u0027) as f:"},{"line_number":367,"context_line":"            f.write(\u0027SyncedEchoCall times: \u0027 +"},{"line_number":368,"context_line":"                    str(self.wait_states()) + \u0027\\n\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FF%2BA%3D","line":365,"updated":"2013-02-07 10:50:10.000000000","message":"apparently it is not used","commit_id":"ac93eaec113c3b0469b7df591d9efb3eac945545"},{"author":{"_account_id":6539,"name":"Raymond Pekowski","email":"pekowski@gmail.com","username":"pekowski"},"change_message_id":"940dc9a626684841bf32c2550cd8c8f36630a5b7","unresolved":false,"context_lines":[{"line_number":362,"context_line":"            f.write(\u0027        \u0027 + str(self.list[1].time) + \u0027\\n\u0027)"},{"line_number":363,"context_line":"            f.write(\u0027        \u0027 + str(self.list[2].time) + \u0027\\n\u0027)"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    def print_wait_states(self):"},{"line_number":366,"context_line":"        with open(\u0027mylog\u0027, \u0027a\u0027) as f:"},{"line_number":367,"context_line":"            f.write(\u0027SyncedEchoCall times: \u0027 +"},{"line_number":368,"context_line":"                    str(self.wait_states()) + \u0027\\n\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FFi8%3D","line":365,"in_reply_to":"AAAAM3%2F%2FF%2BA%3D","updated":"2013-02-07 15:34:44.000000000","message":"I used this for debugging.  You can see where I used it in the commented out call in the post() method.  I will remove it if such things are considered bad.\nBTW, if anyone knows a better way to do debug logging in the unit tests, let me know.  As you can see I created my own \u0027mylog\u0027 file for this purpose.","commit_id":"ac93eaec113c3b0469b7df591d9efb3eac945545"},{"author":{"_account_id":159,"name":"Eric Windisch","email":"ewindisch@docker.com","username":"ewindisch"},"change_message_id":"bd3970fadc608d62f1e89fa49d16a5cacb422e69","unresolved":false,"context_lines":[{"line_number":362,"context_line":"            f.write(\u0027        \u0027 + str(self.list[1].time) + \u0027\\n\u0027)"},{"line_number":363,"context_line":"            f.write(\u0027        \u0027 + str(self.list[2].time) + \u0027\\n\u0027)"},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    def print_wait_states(self):"},{"line_number":366,"context_line":"        with open(\u0027mylog\u0027, \u0027a\u0027) as f:"},{"line_number":367,"context_line":"            f.write(\u0027SyncedEchoCall times: \u0027 +"},{"line_number":368,"context_line":"                    str(self.wait_states()) + \u0027\\n\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAM3%2F%2FBDU%3D","line":365,"in_reply_to":"AAAAM3%2F%2FFi8%3D","updated":"2013-02-11 16:07:19.000000000","message":"I\u0027d rather this is removed. Debug logging happens during tests, but you generally need to fail the test to see it.","commit_id":"ac93eaec113c3b0469b7df591d9efb3eac945545"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ae3d817bbb42817008960f640d5c14c266225a33","unresolved":false,"context_lines":[{"line_number":297,"context_line":"    return ret"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"class SyncedEchoCall():"},{"line_number":301,"context_line":"    \"\"\"Class to control the synchronization of the synced_echo method of the"},{"line_number":302,"context_line":"       TestReceiver class"},{"line_number":303,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2B77U%3D","line":300,"updated":"2013-02-13 21:46:41.000000000","message":"Very clever.","commit_id":"53d8209511feabd52a63ff564bf594bfa7abba39"},{"author":{"_account_id":6539,"name":"Raymond Pekowski","email":"pekowski@gmail.com","username":"pekowski"},"change_message_id":"5693ba4dd8977475dd3785655f8f8db322399251","unresolved":false,"context_lines":[{"line_number":352,"context_line":"    def verify_time_order(self, idx1, idx2, idx3):"},{"line_number":353,"context_line":"        return self.list[idx1].time \u003c self.list[idx2].time and \\"},{"line_number":354,"context_line":"            self.list[idx2].time \u003c self.list[idx3].time"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"class TestReceiver(object):"},{"line_number":358,"context_line":"    \"\"\"Simple Proxy class so the consumer has methods to call."}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAM3%2F%2B4Tk%3D","line":355,"updated":"2013-02-15 18:10:38.000000000","message":"I wonder if I should add the following back in for debug purposes?  I could change \"mylog\" to \"/dev/null\" and have real calls to them where I had them commented out before.  The problem is that if I use normal logging the code hangs, you don\u0027t get any log output.  I kind of like letting other people know about how to debug this code.\n\n    def print_times(self):\n        with open(\u0027mylog\u0027, \u0027a\u0027) as f:\n            f.write(\u0027SyncedEchoCall times: \u0027 + \u0027\\n\u0027)\n            f.write(\u0027        \u0027 + str(self.list[0].time) + \u0027\\n\u0027)\n            f.write(\u0027        \u0027 + str(self.list[1].time) + \u0027\\n\u0027)\n            f.write(\u0027        \u0027 + str(self.list[2].time) + \u0027\\n\u0027)\n\n    def print_wait_states(self):\n        with open(\u0027mylog\u0027, \u0027a\u0027) as f:\n            f.write(\u0027SyncedEchoCall times: \u0027 +\n                     str(self.wait_states()) + \u0027\\n\u0027)\n\nI won\u0027t add it back in unless someone comments that I should.","commit_id":"53d8209511feabd52a63ff564bf594bfa7abba39"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"55c2ee36c754116491208a5dace973727123692f","unresolved":false,"context_lines":[{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    def print_times(self):"},{"line_number":359,"context_line":"        # change /dev/null to name to get output to a log file"},{"line_number":360,"context_line":"        with open(\u0027/dev/null\u0027, \u0027a\u0027) as f:"},{"line_number":361,"context_line":"                f.write(\u0027SyncedEchoCall times: \u0027 + \u0027\\n\u0027)"},{"line_number":362,"context_line":"                f.write(\u0027 \u0027 + str(self.list[0].time) + \u0027\\n\u0027)"},{"line_number":363,"context_line":"                f.write(\u0027 \u0027 + str(self.list[1].time) + \u0027\\n\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAM3%2F%2B3Z4%3D","line":360,"updated":"2013-02-16 01:15:17.000000000","message":"I think it\u0027s ok to leave this code in, but can you comment it out?  It seems odd to run it when it\u0027s not doing anything.","commit_id":"52e95f2857e9e2871c973dd7f64748fff22a6ba6"}]}
