)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"9f3a835e85a0cc54f944424b158ec49943b7d706","unresolved":false,"context_lines":[{"line_number":14,"context_line":"- Changes the API so db_file is not used by servers. Implementations"},{"line_number":15,"context_line":"  of Pluggable Back-ends do not have to provide that field anymore."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"- Hides is_deleged(). Implementations do not need to emulate it."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"- Gets rid of .metadata member. Benefit of this is mainly that the"},{"line_number":20,"context_line":"  metadata is loaded from back-end storage not when .metadata is"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAATn%2F%2FYRU%3D","line":17,"updated":"2013-11-07 19:34:03.000000000","message":"Do you mean \"is_deleted\"?","commit_id":"b99fa1881c0651a71e32ac189e0d2345fb6825c9"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"9f3a835e85a0cc54f944424b158ec49943b7d706","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"This patch doesn\u0027t:"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"- Does not rename _get_account_broker into get_account_api (ditto for"},{"line_number":31,"context_line":"  container). Mayhaps we just merge the get_broker() patch before this"},{"line_number":32,"context_line":"  becomes important."},{"line_number":33,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAATn%2F%2FYRM%3D","line":30,"updated":"2013-11-07 19:34:03.000000000","message":"Does not the \"broker\" name imply knowing the history of what this was doing? Perhaps to match with the class names above, how \u0027bout \"get_account_backend()\"?","commit_id":"b99fa1881c0651a71e32ac189e0d2345fb6825c9"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"4d960b84802cebf1e73938827f8f951ac5f28d67","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"This patch doesn\u0027t:"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"- Does not rename _get_account_broker into get_account_api (ditto for"},{"line_number":31,"context_line":"  container). Mayhaps we just merge the get_broker() patch before this"},{"line_number":32,"context_line":"  becomes important."},{"line_number":33,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAATn%2F%2BeMU%3D","line":30,"in_reply_to":"AAAATn%2F%2FYFM%3D","updated":"2013-11-25 18:08:17.000000000","message":"Not sure where the extra churn will come in if we settle on the name here.  I don\u0027t mind get_account_backend() ...","commit_id":"b99fa1881c0651a71e32ac189e0d2345fb6825c9"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"ee3ac60df9106fb963666e08d4956346bdb9a9cd","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"This patch doesn\u0027t:"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"- Does not rename _get_account_broker into get_account_api (ditto for"},{"line_number":31,"context_line":"  container). Mayhaps we just merge the get_broker() patch before this"},{"line_number":32,"context_line":"  becomes important."},{"line_number":33,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAATn%2F%2FYFM%3D","line":30,"in_reply_to":"AAAATn%2F%2FYRM%3D","updated":"2013-11-07 22:08:01.000000000","message":"But I thought you were going to rename it anyway, so why create extra churn? Either that, or switch to get_backend() loader that makes it all moot.","commit_id":"b99fa1881c0651a71e32ac189e0d2345fb6825c9"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"9f3a835e85a0cc54f944424b158ec49943b7d706","unresolved":false,"context_lines":[{"line_number":34,"context_line":"- Does not screw with auditors and replicators, except one thing:"},{"line_number":35,"context_line":"  making them use db_file less."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Overall, danger of regressions is extreme. This requires testing."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Change-Id: I54d54eb8984d6bca4be912e7451f82e11b2db6ca"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAATn%2F%2FYRE%3D","line":37,"updated":"2013-11-07 19:34:03.000000000","message":"Why do you consider the danger of regressions to be extreme? It seems like we do have a risk of regressions, but this code is not changing any behaviors, right?","commit_id":"b99fa1881c0651a71e32ac189e0d2345fb6825c9"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"ee3ac60df9106fb963666e08d4956346bdb9a9cd","unresolved":false,"context_lines":[{"line_number":34,"context_line":"- Does not screw with auditors and replicators, except one thing:"},{"line_number":35,"context_line":"  making them use db_file less."},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"Overall, danger of regressions is extreme. This requires testing."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"Change-Id: I54d54eb8984d6bca4be912e7451f82e11b2db6ca"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAATn%2F%2FYE8%3D","line":37,"in_reply_to":"AAAATn%2F%2FYRE%3D","updated":"2013-11-07 22:08:01.000000000","message":"Experience shows that Swift contributors are weak at this, and I\u0027m worse than most. My reputation suffered 2 ugly defeats when I put +1 on Chuck\u0027s memcache thing and the Donagh\u0027s 401 patch, then both were found to be wrong. Heck you did most of investigation for memcache. I cannot imagine not screwing up somewhere in patch this big.  If you review tightly and pronounce it good we can replace \"extreme\" with \"significant\". :-)","commit_id":"b99fa1881c0651a71e32ac189e0d2345fb6825c9"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"0c3eda46ddb13846ef4e5433dbb0335d24c0e10f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Pete Zaitcev \u003czaitcev@kotori.zaitcev.us\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-12-03 17:01:33 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Pluggable Back-ends for account and container servers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch does:"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAATn%2F9tgo%3D","line":7,"updated":"2013-12-06 21:00:06.000000000","message":"Can we re-title this to something like:\n\nAccount and Container Backend Storage APIs\n\nPluggable seems a bit misleading here.","commit_id":"14721afbb125156bd8d04e3943eda3c2a9da8f0f"},{"author":{"_account_id":7652,"name":"Luis Pabón","email":"lpabon@gmail.com","username":"lpabon"},"change_message_id":"9170e8e888f8fc9c0af72ee316a8a30e54645d44","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Pete Zaitcev \u003czaitcev@kotori.zaitcev.us\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-12-03 17:01:33 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Pluggable Back-ends for account and container servers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch does:"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAATn%2F9te8%3D","line":7,"updated":"2013-12-06 21:29:47.000000000","message":"I am not sure this system provides a pluggable solution.  It seems to me that the change is intended to a first phase in a future pluggable system, but the current implementation as it described is not pluggable.\n\nI would recommend that the name of the commit reflects what it is trying to do, instead what it will provide someday down the line.\n\nIt could be changed to something like:\n\"Account and Container Backend APIs\", because, IMHO, this fix is trying to create a contract between the backends and their respective services.","commit_id":"14721afbb125156bd8d04e3943eda3c2a9da8f0f"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"0c3eda46ddb13846ef4e5433dbb0335d24c0e10f","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch does:"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"- Introduces AccountBackend and ContainerBackend with attendant"},{"line_number":12,"context_line":"  exceptions and makes it the sole API that servers use."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"- Changes the API so db_file is not used by servers. Implementations"},{"line_number":15,"context_line":"  of Pluggable Back-ends do not have to provide that field anymore."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAATn%2F9tgI%3D","line":12,"updated":"2013-12-06 21:00:06.000000000","message":"How \u0027bout: s/sole API that servers use/API that the REST API layer of the account and container servers use/?","commit_id":"14721afbb125156bd8d04e3943eda3c2a9da8f0f"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"0c3eda46ddb13846ef4e5433dbb0335d24c0e10f","unresolved":false,"context_lines":[{"line_number":12,"context_line":"  exceptions and makes it the sole API that servers use."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"- Changes the API so db_file is not used by servers. Implementations"},{"line_number":15,"context_line":"  of Pluggable Back-ends do not have to provide that field anymore."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"- Hides is_deleted(). Implementations do not need to emulate it."},{"line_number":18,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAATn%2F9tfo%3D","line":15,"updated":"2013-12-06 21:00:06.000000000","message":"How \u0027bout: s/of Pluggable Back-ends/these APIs/","commit_id":"14721afbb125156bd8d04e3943eda3c2a9da8f0f"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"0c3eda46ddb13846ef4e5433dbb0335d24c0e10f","unresolved":false,"context_lines":[{"line_number":23,"context_line":"  against rename races of some kind."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"- Renames _get_account_broker into get_account_backend without an"},{"line_number":26,"context_line":"  underscore (ditto for container)."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"This patch doesn\u0027t:"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAATn%2F9te0%3D","line":26,"updated":"2013-12-06 21:00:06.000000000","message":"Can you add here: the get_account_backend() method is intended to be over-ridden by a given implementation to provide instance of the backend API.\n\nWould you be willing to accept an alternate in-memory implemenation to add to this patch that demonstrates the API, like we did for DiskFile?","commit_id":"14721afbb125156bd8d04e3943eda3c2a9da8f0f"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"7f764575096a49d5d68ba3bad923215827ebab4b","unresolved":false,"context_lines":[{"line_number":23,"context_line":"  against rename races of some kind."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"- Renames _get_account_broker into get_account_backend without an"},{"line_number":26,"context_line":"  underscore (ditto for container)."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"This patch doesn\u0027t:"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"AAAATn%2F9sxw%3D","line":26,"in_reply_to":"AAAATn%2F9te0%3D","updated":"2013-12-07 01:49:47.000000000","message":"Sure, I can even write such an implementation myself, you know.","commit_id":"14721afbb125156bd8d04e3943eda3c2a9da8f0f"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"16e686714e5d4177df867568f5aa5a1b5c1666f9","unresolved":false,"context_lines":[{"line_number":29,"context_line":"  mem_backend.py in object server."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"- Fixes up a problem with double mocking of Request.__init__,"},{"line_number":32,"context_line":"  which should be seen in stock code as well."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"- Moves DATADIR around."},{"line_number":35,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAAUH%2F9y%2Fc%3D","line":32,"updated":"2014-02-03 23:18:43.000000000","message":"Can you consider pulling this fix out seperately?","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"aad61291d60101346a6a67c143b2077425e258e4","unresolved":false,"context_lines":[{"line_number":29,"context_line":"  mem_backend.py in object server."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"- Fixes up a problem with double mocking of Request.__init__,"},{"line_number":32,"context_line":"  which should be seen in stock code as well."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"- Moves DATADIR around."},{"line_number":35,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAAUH%2F9stc%3D","line":32,"in_reply_to":"AAAAUH%2F9y%2Fc%3D","updated":"2014-02-05 04:46:10.000000000","message":"Wanted to write \"Done\" here but you already had.","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"16e686714e5d4177df867568f5aa5a1b5c1666f9","unresolved":false,"context_lines":[{"line_number":31,"context_line":"- Fixes up a problem with double mocking of Request.__init__,"},{"line_number":32,"context_line":"  which should be seen in stock code as well."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"- Moves DATADIR around."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"This patch doesn\u0027t:"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAAUH%2F9y%2Bs%3D","line":34,"updated":"2014-02-03 23:18:43.000000000","message":"If this is a significant change, can you say more?\n\nPerhaps it is worth pulling this change out into a separate commit ahead of this one to avoid all the little changes?","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"aad61291d60101346a6a67c143b2077425e258e4","unresolved":false,"context_lines":[{"line_number":31,"context_line":"- Fixes up a problem with double mocking of Request.__init__,"},{"line_number":32,"context_line":"  which should be seen in stock code as well."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"- Moves DATADIR around."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"This patch doesn\u0027t:"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAAUH%2F9stQ%3D","line":34,"in_reply_to":"AAAAUH%2F9y%2Bs%3D","updated":"2014-02-05 04:46:10.000000000","message":"Moving DATADIR is not significant, IMHO. It was merely something Luis wanted for clarity.","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"16e686714e5d4177df867568f5aa5a1b5c1666f9","unresolved":false,"context_lines":[{"line_number":38,"context_line":"- Does not screw with auditors and replicators, except one thing:"},{"line_number":39,"context_line":"  making them use db_file less."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"Overall, danger of regressions is significant. This requires testing."},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"Change-Id: I54d54eb8984d6bca4be912e7451f82e11b2db6ca"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"AAAAUH%2F9y%2BY%3D","line":41,"updated":"2014-02-03 23:18:43.000000000","message":"How can we lessen this impact? Can we add more unit tests or functional tests that verify the behavior ahead of this patch so that this danger is not significant?","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"}],"swift/account/backend.py":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"7cfb3ac57bc0e007478877b0e19fe5f10cb114e4","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        :raises EntityAlreadyDeleted: the entity is already deleted"},{"line_number":167,"context_line":"        \"\"\""},{"line_number":168,"context_line":"        if self.is_deleted():"},{"line_number":169,"context_line":"            raise EntityAlreadyDeleted()"},{"line_number":170,"context_line":"        self.delete_db(timestamp)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def _commit_puts_load(self, item_list, entry):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2Fzsw%3D","line":169,"updated":"2013-10-09 17:37:20.000000000","message":"Rename into \"does not exist\" because it\u0027s the meaning above the API","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":7223,"name":"Ayal Baron","email":"abaron@redhat.com"},"change_message_id":"d90de62ac9ba324c770b0293e5135f8d3ebbc897","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        :raises EntityAlreadyDeleted: the entity is already deleted"},{"line_number":167,"context_line":"        \"\"\""},{"line_number":168,"context_line":"        if self.is_deleted():"},{"line_number":169,"context_line":"            raise EntityAlreadyDeleted()"},{"line_number":170,"context_line":"        self.delete_db(timestamp)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def _commit_puts_load(self, item_list, entry):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2Fzlw%3D","line":169,"updated":"2013-10-09 17:44:44.000000000","message":"why check here at all? just try to delete?","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":7652,"name":"Luis Pabón","email":"lpabon@gmail.com","username":"lpabon"},"change_message_id":"9170e8e888f8fc9c0af72ee316a8a30e54645d44","unresolved":false,"context_lines":[{"line_number":424,"context_line":"            conn.commit()"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":""},{"line_number":427,"context_line":"class AccountBackend(AccountBroker):"},{"line_number":428,"context_line":"    \"\"\""},{"line_number":429,"context_line":"    Encapsulates working with accounts. Every account is an entity"},{"line_number":430,"context_line":"    which the broker manipulates."}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F9tX8%3D","line":427,"updated":"2013-12-06 21:29:47.000000000","message":"IMHO, this class and the AccountBroker classes should be an abstract class, which if not implemented, would return errors.  I suggest this because actually implementing a swift backend as AccountBackend() in swift.account.backend.py seems to have more member functions than would be needed by other non-database backends.  This may lead to developers assuming that because AccountBackend() has that member function, that all \"pluggable\" backends should also.  \n\nMore information on abstract classes in python here:\nhttp://docs.python.org/2.6/library/abc.html","commit_id":"14721afbb125156bd8d04e3943eda3c2a9da8f0f"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"ea03fe0598934d6caa44bd981c783e29d7763226","unresolved":false,"context_lines":[{"line_number":424,"context_line":"            conn.commit()"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":""},{"line_number":427,"context_line":"class AccountBackend(AccountBroker):"},{"line_number":428,"context_line":"    \"\"\""},{"line_number":429,"context_line":"    Encapsulates working with accounts. Every account is an entity"},{"line_number":430,"context_line":"    which the broker manipulates."}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F9llg%3D","line":427,"in_reply_to":"AAAATn%2F9tX8%3D","updated":"2013-12-09 22:35:49.000000000","message":"The abstract class itself would help manifest the methods that Gluster has to implement clearly, that\u0027s true. However, it then turns into a bunch of trampolines for the default back-end, because I cannot shed the old AccountBroker thing. It\u0027s a long story, but we need some kind of \"dual-headed\" monster here.\n\nHow about this... Peter reminded me that it would be nice to have an in-memory example, same as he has for object. Once I do that, just duck-type that one if AccountBackend itself is too convoluted. Would that work?","commit_id":"14721afbb125156bd8d04e3943eda3c2a9da8f0f"},{"author":{"_account_id":7652,"name":"Luis Pabón","email":"lpabon@gmail.com","username":"lpabon"},"change_message_id":"3822594d5968acaa23092968c5ae522ca3527d94","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    DatabaseAlreadyExists, DatabaseConnectionError, \\"},{"line_number":33,"context_line":"    PENDING_CAP, PICKLE_PROTOCOL, utf8encode"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"DATADIR \u003d \u0027accounts\u0027"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"class AccountBroker(DatabaseBroker):"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAUH%2F%2FLIM%3D","line":35,"updated":"2014-01-16 18:47:03.000000000","message":"I suggest putting a comment here to describe why DATADIR is set to be \u0027accounts\u0027.","commit_id":"ae8901b8738bbd75b705aebcd9578689a46dd758"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"16e686714e5d4177df867568f5aa5a1b5c1666f9","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        :param name: name of the container to create"},{"line_number":196,"context_line":"        :param put_timestamp: put_timestamp of the container to create"},{"line_number":197,"context_line":"        :param delete_timestamp: delete_timestamp of the container to create"},{"line_number":198,"context_line":"        :param object_count: number of objects in the container (string)"},{"line_number":199,"context_line":"        :param bytes_used: number of bytes used by the container (string)"},{"line_number":200,"context_line":"        \"\"\""},{"line_number":201,"context_line":"        if delete_timestamp \u003e put_timestamp and \\"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9yg4%3D","line":198,"updated":"2014-02-03 23:18:43.000000000","message":"Is it expecting strings to work correctly?","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"aad61291d60101346a6a67c143b2077425e258e4","unresolved":false,"context_lines":[{"line_number":195,"context_line":"        :param name: name of the container to create"},{"line_number":196,"context_line":"        :param put_timestamp: put_timestamp of the container to create"},{"line_number":197,"context_line":"        :param delete_timestamp: delete_timestamp of the container to create"},{"line_number":198,"context_line":"        :param object_count: number of objects in the container (string)"},{"line_number":199,"context_line":"        :param bytes_used: number of bytes used by the container (string)"},{"line_number":200,"context_line":"        \"\"\""},{"line_number":201,"context_line":"        if delete_timestamp \u003e put_timestamp and \\"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9sUk%3D","line":198,"in_reply_to":"AAAAUH%2F9yg4%3D","updated":"2014-02-05 04:46:10.000000000","message":"It\u0027s true to DB auto-converts (it has to, because its table column type is INTEGER). I meant to narrow it down so to make it easier for implementations. Our existing callers supply a string. I replaced with \"either str or int\", to codify that implementation must support either. Fortunately, mem_backend.py is already compliant.","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"16e686714e5d4177df867568f5aa5a1b5c1666f9","unresolved":false,"context_lines":[{"line_number":444,"context_line":"        kwargs.setdefault(\u0027account\u0027, account)"},{"line_number":445,"context_line":"        super(AccountBackend, self).__init__(db_path, **kwargs)"},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"    def _is_status_deleted(self):"},{"line_number":448,"context_line":"        \"\"\""},{"line_number":449,"context_line":"        Check if a database status is \"deleted\"."},{"line_number":450,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9ycs%3D","line":447,"updated":"2014-02-03 23:18:43.000000000","message":"It appears that this method can be merged with it\u0027s parent\u0027s method, is_status_deleted(). The account reaper appears to be the only code outside of this code to use is_status_deleted, and appears to benefit from the exception handling below.","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"aad61291d60101346a6a67c143b2077425e258e4","unresolved":false,"context_lines":[{"line_number":444,"context_line":"        kwargs.setdefault(\u0027account\u0027, account)"},{"line_number":445,"context_line":"        super(AccountBackend, self).__init__(db_path, **kwargs)"},{"line_number":446,"context_line":""},{"line_number":447,"context_line":"    def _is_status_deleted(self):"},{"line_number":448,"context_line":"        \"\"\""},{"line_number":449,"context_line":"        Check if a database status is \"deleted\"."},{"line_number":450,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9r%2Fw%3D","line":447,"in_reply_to":"AAAAUH%2F9ycs%3D","updated":"2014-02-05 04:46:10.000000000","message":"I\u0027m afraid I do not understand this. If account reaper fails to open the database, it aborts. Do you want to change the code so it continues?","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"16e686714e5d4177df867568f5aa5a1b5c1666f9","unresolved":false,"context_lines":[{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    def delete(self, timestamp):"},{"line_number":462,"context_line":"        \"\"\""},{"line_number":463,"context_line":"        Mark the entity as deleted"},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"        :param timestamp: delete timestamp"},{"line_number":466,"context_line":"        :returns: A boolean true if something was there to delete"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9ycQ%3D","line":463,"updated":"2014-02-03 23:18:43.000000000","message":"Not sure you need to use the abstract \"entity\" here, since the scope is accounts only. If you get back here, might be worth being specific in the wording.","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"aad61291d60101346a6a67c143b2077425e258e4","unresolved":false,"context_lines":[{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    def delete(self, timestamp):"},{"line_number":462,"context_line":"        \"\"\""},{"line_number":463,"context_line":"        Mark the entity as deleted"},{"line_number":464,"context_line":""},{"line_number":465,"context_line":"        :param timestamp: delete timestamp"},{"line_number":466,"context_line":"        :returns: A boolean true if something was there to delete"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9rrA%3D","line":463,"in_reply_to":"AAAAUH%2F9ycQ%3D","updated":"2014-02-05 04:46:10.000000000","message":"Done, wording changed. I fixed the containers too.","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"16e686714e5d4177df867568f5aa5a1b5c1666f9","unresolved":false,"context_lines":[{"line_number":470,"context_line":"        if existed:"},{"line_number":471,"context_line":"            self.delete_db(timestamp)"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"        if not self._is_status_deleted():"},{"line_number":474,"context_line":"            raise EntityConflict()"},{"line_number":475,"context_line":""},{"line_number":476,"context_line":"        return existed"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9ycA%3D","line":473,"updated":"2014-02-03 23:18:43.000000000","message":"I have always found this code to invite race conditions. Is there a way delete_db() can return this information instead?","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"aad61291d60101346a6a67c143b2077425e258e4","unresolved":false,"context_lines":[{"line_number":470,"context_line":"        if existed:"},{"line_number":471,"context_line":"            self.delete_db(timestamp)"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"        if not self._is_status_deleted():"},{"line_number":474,"context_line":"            raise EntityConflict()"},{"line_number":475,"context_line":""},{"line_number":476,"context_line":"        return existed"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9rok%3D","line":473,"in_reply_to":"AAAAUH%2F9ycA%3D","updated":"2014-02-05 04:46:10.000000000","message":"Yeah, but if let delete_db raise EntityConflict, then I have to adjust the replicators, too... Just one more thing to go wrong. Makes sense, of course.","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"16e686714e5d4177df867568f5aa5a1b5c1666f9","unresolved":false,"context_lines":[{"line_number":481,"context_line":"        \"\"\""},{"line_number":482,"context_line":"        Put a container into an account, along with its two timestamps, count"},{"line_number":483,"context_line":"        of objects and total bytes used. Optionally, the caller can specify"},{"line_number":484,"context_line":"        the account auto created if it does not exist, and optionally specify"},{"line_number":485,"context_line":"        that an account marked for deletion can be undeleted by adding the"},{"line_number":486,"context_line":"        specified container."},{"line_number":487,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9ybY%3D","line":484,"updated":"2014-02-03 23:18:43.000000000","message":"perhaps add, \"_to have_ the account auto ...\"","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"aad61291d60101346a6a67c143b2077425e258e4","unresolved":false,"context_lines":[{"line_number":481,"context_line":"        \"\"\""},{"line_number":482,"context_line":"        Put a container into an account, along with its two timestamps, count"},{"line_number":483,"context_line":"        of objects and total bytes used. Optionally, the caller can specify"},{"line_number":484,"context_line":"        the account auto created if it does not exist, and optionally specify"},{"line_number":485,"context_line":"        that an account marked for deletion can be undeleted by adding the"},{"line_number":486,"context_line":"        specified container."},{"line_number":487,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9rqs%3D","line":484,"in_reply_to":"AAAAUH%2F9ybY%3D","updated":"2014-02-05 04:46:10.000000000","message":"I do not understand, sorry. My English is not legit, but still, \"specify to have the account done something\" sounds cumbersome.","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"16e686714e5d4177df867568f5aa5a1b5c1666f9","unresolved":false,"context_lines":[{"line_number":487,"context_line":""},{"line_number":488,"context_line":"        :param container: name of the container to create"},{"line_number":489,"context_line":"        :param timestamp: timestamp an auto-created account will have"},{"line_number":490,"context_line":"        :param put_timestamp: put_timestamp of the container to create"},{"line_number":491,"context_line":"        :param delete_timestamp: delete_timestamp of the container to create"},{"line_number":492,"context_line":"        :param object_count: number of objects in the container (string)"},{"line_number":493,"context_line":"        :param bytes_used: number of bytes used by the container (string)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9yak%3D","line":490,"updated":"2014-02-03 23:18:43.000000000","message":"\"to add\"? We are not creating containers but tracking them ...\n\nOr maybe, \"put_timestamp of the created container\"?","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"aad61291d60101346a6a67c143b2077425e258e4","unresolved":false,"context_lines":[{"line_number":487,"context_line":""},{"line_number":488,"context_line":"        :param container: name of the container to create"},{"line_number":489,"context_line":"        :param timestamp: timestamp an auto-created account will have"},{"line_number":490,"context_line":"        :param put_timestamp: put_timestamp of the container to create"},{"line_number":491,"context_line":"        :param delete_timestamp: delete_timestamp of the container to create"},{"line_number":492,"context_line":"        :param object_count: number of objects in the container (string)"},{"line_number":493,"context_line":"        :param bytes_used: number of bytes used by the container (string)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9rog%3D","line":490,"in_reply_to":"AAAAUH%2F9yak%3D","updated":"2014-02-05 04:46:10.000000000","message":"Done","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"16e686714e5d4177df867568f5aa5a1b5c1666f9","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        :param container: name of the container to create"},{"line_number":489,"context_line":"        :param timestamp: timestamp an auto-created account will have"},{"line_number":490,"context_line":"        :param put_timestamp: put_timestamp of the container to create"},{"line_number":491,"context_line":"        :param delete_timestamp: delete_timestamp of the container to create"},{"line_number":492,"context_line":"        :param object_count: number of objects in the container (string)"},{"line_number":493,"context_line":"        :param bytes_used: number of bytes used by the container (string)"},{"line_number":494,"context_line":"        :param auto_create: optionally automatically create the account if it"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9yaU%3D","line":491,"updated":"2014-02-03 23:18:43.000000000","message":"Perhaps, \"delete_timestamp of the created container\"?","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"16e686714e5d4177df867568f5aa5a1b5c1666f9","unresolved":false,"context_lines":[{"line_number":505,"context_line":"                self._initialize_db(timestamp)"},{"line_number":506,"context_line":"            except DatabaseAlreadyExists:"},{"line_number":507,"context_line":"                pass"},{"line_number":508,"context_line":"        if not override_deleted and self.is_deleted():"},{"line_number":509,"context_line":"            raise EntityNotExist()"},{"line_number":510,"context_line":"        super(AccountBackend, self).put_container("},{"line_number":511,"context_line":"            container, put_timestamp, delete_timestamp, object_count,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9yXM%3D","line":508,"updated":"2014-02-03 23:18:43.000000000","message":"Not sure we should adjust this in this patch, but it sure seems check with auto_create\u003dTrue is extra work we don\u0027t need.","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"aad61291d60101346a6a67c143b2077425e258e4","unresolved":false,"context_lines":[{"line_number":505,"context_line":"                self._initialize_db(timestamp)"},{"line_number":506,"context_line":"            except DatabaseAlreadyExists:"},{"line_number":507,"context_line":"                pass"},{"line_number":508,"context_line":"        if not override_deleted and self.is_deleted():"},{"line_number":509,"context_line":"            raise EntityNotExist()"},{"line_number":510,"context_line":"        super(AccountBackend, self).put_container("},{"line_number":511,"context_line":"            container, put_timestamp, delete_timestamp, object_count,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9roY%3D","line":508,"in_reply_to":"AAAAUH%2F9yXM%3D","updated":"2014-02-05 04:46:10.000000000","message":"I thought it was in case of those infamous consistency issues.","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"16e686714e5d4177df867568f5aa5a1b5c1666f9","unresolved":false,"context_lines":[{"line_number":532,"context_line":"                raise EntityNotExist()"},{"line_number":533,"context_line":"            created \u003d self.is_deleted()"},{"line_number":534,"context_line":"            self.update_put_timestamp(timestamp)"},{"line_number":535,"context_line":"            if self.is_deleted():"},{"line_number":536,"context_line":"                raise EntityConflict()"},{"line_number":537,"context_line":"        self.update_metadata(metadata)"},{"line_number":538,"context_line":"        return created"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9yWg%3D","line":535,"updated":"2014-02-03 23:18:43.000000000","message":"Again, not for this commit, but calling is_deleted() twice seems like a band-aid now that this code isolates it all.","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"16e686714e5d4177df867568f5aa5a1b5c1666f9","unresolved":false,"context_lines":[{"line_number":544,"context_line":"        \"\"\""},{"line_number":545,"context_line":"        if self.is_deleted():"},{"line_number":546,"context_line":"            ad \u003d AccountDeleted()"},{"line_number":547,"context_line":"            ad.marked \u003d self._is_status_deleted()"},{"line_number":548,"context_line":"            raise ad"},{"line_number":549,"context_line":"        info \u003d super(AccountBackend, self).get_info()"},{"line_number":550,"context_line":"        info[\u0027metadata\u0027] \u003d self.metadata"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9yVw%3D","line":547,"updated":"2014-02-03 23:18:43.000000000","message":"Also not for this commit, but it would seem we could get is_deleted() to give us the data we need for the proper return value rather than calling another database operation.","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"52dc3ec3f40fd5b6fc738e11e3821ed8e56795cd","unresolved":false,"context_lines":[{"line_number":426,"context_line":""},{"line_number":427,"context_line":"class AccountBackend(AccountBroker):"},{"line_number":428,"context_line":"    \"\"\""},{"line_number":429,"context_line":"    Encapsulates working with accounts. Every account is an entity"},{"line_number":430,"context_line":"    which the broker manipulates."},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    :param path: Path to devices on the node"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUX%2F%2BVTo%3D","line":429,"updated":"2014-02-21 20:13:34.000000000","message":"curious if there are thoughts of other backend types (other than sqlite) that motivated this or was it primary done to get a lot of the details our of the servers?","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e919a666a900036b87e3ee51381565c2616a5fee","unresolved":false,"context_lines":[{"line_number":426,"context_line":""},{"line_number":427,"context_line":"class AccountBackend(AccountBroker):"},{"line_number":428,"context_line":"    \"\"\""},{"line_number":429,"context_line":"    Encapsulates working with accounts. Every account is an entity"},{"line_number":430,"context_line":"    which the broker manipulates."},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    :param path: Path to devices on the node"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVX%2F%2F%2FLU%3D","line":429,"in_reply_to":"AAAAUX%2F%2BVTo%3D","updated":"2014-02-27 01:34:28.000000000","message":"This was primarily for \"filesystem\" based back-ends that map to directories, such as Ceph and GlusterFS. The biggest challenge for them is that they have no sophisticated query and no transactions (they can try and emulate with locking).","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"adc01340b76794051babe881f75f9283fece0cea","unresolved":false,"context_lines":[{"line_number":426,"context_line":""},{"line_number":427,"context_line":"class AccountBackend(AccountBroker):"},{"line_number":428,"context_line":"    \"\"\""},{"line_number":429,"context_line":"    Encapsulates working with accounts. Every account is an entity"},{"line_number":430,"context_line":"    which the broker manipulates."},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"    :param path: Path to devices on the node"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAWH%2F%2BR6E%3D","line":429,"in_reply_to":"AAAAVX%2F%2F%2FLU%3D","updated":"2014-03-27 21:48:59.000000000","message":"holy cow, I had no idea!  a lot of things make more sense now :)","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"52dc3ec3f40fd5b6fc738e11e3821ed8e56795cd","unresolved":false,"context_lines":[{"line_number":471,"context_line":"            self.delete_db(timestamp)"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"        # XXX This is not visible from the outside of the PBE API, but we"},{"line_number":474,"context_line":"        # would do well to refactor so delete_db() raises in a race-free way."},{"line_number":475,"context_line":"        if not self._is_status_deleted():"},{"line_number":476,"context_line":"            raise EntityConflict()"},{"line_number":477,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUX%2F%2BVTU%3D","line":474,"updated":"2014-02-21 20:13:34.000000000","message":"don\u0027t totally understand this, what are you suggesting be refactored and why not just do it now as part of this patch?","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e919a666a900036b87e3ee51381565c2616a5fee","unresolved":false,"context_lines":[{"line_number":471,"context_line":"            self.delete_db(timestamp)"},{"line_number":472,"context_line":""},{"line_number":473,"context_line":"        # XXX This is not visible from the outside of the PBE API, but we"},{"line_number":474,"context_line":"        # would do well to refactor so delete_db() raises in a race-free way."},{"line_number":475,"context_line":"        if not self._is_status_deleted():"},{"line_number":476,"context_line":"            raise EntityConflict()"},{"line_number":477,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVX%2F%2F%2FDI%3D","line":474,"in_reply_to":"AAAAUX%2F%2BVTU%3D","updated":"2014-02-27 01:34:28.000000000","message":"It\u0027s difficult to prove that what we do is not going to regress as it is. This part is copied from legacy code. But I\u0027ll think about it.","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1a6a9d96d7e5857ce8bf9d96bf6b4b0ae5fb8610","unresolved":false,"context_lines":[{"line_number":457,"context_line":"            # Account does not exist!"},{"line_number":458,"context_line":"            res \u003d False"},{"line_number":459,"context_line":"        return res"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    def delete(self, timestamp):"},{"line_number":462,"context_line":"        \"\"\""},{"line_number":463,"context_line":"        Mark the account as deleted"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAXH%2F%2F7ts%3D","line":460,"updated":"2014-04-16 12:47:47.000000000","message":"What happens if there is some other exception raised here? That will return a None, right?\n\nSo maybe you could use this:\n\n try:\n     return self.is_status_deleted()\n except (DatabaseConnectionError, Exception):\n     return False","commit_id":"6f148fde4fcaae85b8e080778bb54b4b93dd0e07"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"6214e03440b09d5499d7337fc64a7495da67f6e7","unresolved":false,"context_lines":[{"line_number":457,"context_line":"            # Account does not exist!"},{"line_number":458,"context_line":"            res \u003d False"},{"line_number":459,"context_line":"        return res"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    def delete(self, timestamp):"},{"line_number":462,"context_line":"        \"\"\""},{"line_number":463,"context_line":"        Mark the account as deleted"}],"source_content_type":"text/x-python","patch_set":14,"id":"9ad9bd40_12306300","line":460,"in_reply_to":"AAAAXH%2F%2F7ts%3D","updated":"2014-05-02 21:33:10.000000000","message":"If an exception is not caught, it\u0027s propagated to the caller.","commit_id":"6f148fde4fcaae85b8e080778bb54b4b93dd0e07"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1a6a9d96d7e5857ce8bf9d96bf6b4b0ae5fb8610","unresolved":false,"context_lines":[{"line_number":518,"context_line":"        super(AccountBackend, self).put_container("},{"line_number":519,"context_line":"            container, put_timestamp, delete_timestamp, object_count,"},{"line_number":520,"context_line":"            bytes_used)"},{"line_number":521,"context_line":"        return False if delete_timestamp \u003e put_timestamp else True"},{"line_number":522,"context_line":""},{"line_number":523,"context_line":"    def create(self, timestamp, metadata):"},{"line_number":524,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAXH%2F%2F7so%3D","line":521,"updated":"2014-04-16 12:47:47.000000000","message":"Maybe I\u0027m the only one nitpicking here, but I would prefer something like this (feels more Pythonic to me)\n\n if delete_timestamp \u003e put_timestamp:\n     return False\n return True","commit_id":"6f148fde4fcaae85b8e080778bb54b4b93dd0e07"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"6214e03440b09d5499d7337fc64a7495da67f6e7","unresolved":false,"context_lines":[{"line_number":518,"context_line":"        super(AccountBackend, self).put_container("},{"line_number":519,"context_line":"            container, put_timestamp, delete_timestamp, object_count,"},{"line_number":520,"context_line":"            bytes_used)"},{"line_number":521,"context_line":"        return False if delete_timestamp \u003e put_timestamp else True"},{"line_number":522,"context_line":""},{"line_number":523,"context_line":"    def create(self, timestamp, metadata):"},{"line_number":524,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":14,"id":"9ad9bd40_950a9d1f","line":521,"in_reply_to":"AAAAXH%2F%2F7so%3D","updated":"2014-05-02 21:33:10.000000000","message":"I thought splitting up the conditionals was less pythonic, not more. I\u0027m open to any style, but never had anyone raise an issue with this before.","commit_id":"6f148fde4fcaae85b8e080778bb54b4b93dd0e07"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1a6a9d96d7e5857ce8bf9d96bf6b4b0ae5fb8610","unresolved":false,"context_lines":[{"line_number":535,"context_line":"        try:"},{"line_number":536,"context_line":"            self._initialize_db(timestamp)"},{"line_number":537,"context_line":"            created \u003d True"},{"line_number":538,"context_line":"        except DatabaseAlreadyExists:"},{"line_number":539,"context_line":"            if self._is_status_deleted():"},{"line_number":540,"context_line":"                raise EntityNotExist()"},{"line_number":541,"context_line":"            created \u003d self.is_deleted()"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAXH%2F%2F7sM%3D","line":538,"updated":"2014-04-16 12:47:47.000000000","message":"Hmm, could it happen that there are other Exceptions raised here? In that case created is not defined when returning","commit_id":"6f148fde4fcaae85b8e080778bb54b4b93dd0e07"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"6214e03440b09d5499d7337fc64a7495da67f6e7","unresolved":false,"context_lines":[{"line_number":535,"context_line":"        try:"},{"line_number":536,"context_line":"            self._initialize_db(timestamp)"},{"line_number":537,"context_line":"            created \u003d True"},{"line_number":538,"context_line":"        except DatabaseAlreadyExists:"},{"line_number":539,"context_line":"            if self._is_status_deleted():"},{"line_number":540,"context_line":"                raise EntityNotExist()"},{"line_number":541,"context_line":"            created \u003d self.is_deleted()"}],"source_content_type":"text/x-python","patch_set":14,"id":"9ad9bd40_b52401b0","line":538,"in_reply_to":"AAAAXH%2F%2F7sM%3D","updated":"2014-05-02 21:33:10.000000000","message":"Same explanation: if nothing stops it, it goes straight up to the top-level catcher that prints \"UNCAUGHT EXCEPTION\" into logs. Which should not happen in this case, but at least we know when it does.","commit_id":"6f148fde4fcaae85b8e080778bb54b4b93dd0e07"}],"swift/account/mem_backend.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"9dcdd44e3aa1c015f40dcbf56ea45b8bd41ed64a","unresolved":false,"context_lines":[{"line_number":306,"context_line":"        if containers:"},{"line_number":307,"context_line":"            cdict \u003d arec[\u0027_containers\u0027]"},{"line_number":308,"context_line":"            for cont in containers:"},{"line_number":309,"context_line":"                # XXX Wait, does mainline really list deleted containers too?"},{"line_number":310,"context_line":"                list_item \u003d []"},{"line_number":311,"context_line":"                list_item.append(cont)"},{"line_number":312,"context_line":"                record \u003d cdict[cont]"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_2be5cadc","line":309,"updated":"2015-03-06 19:36:53.000000000","message":"no it doesn\u0027t, it has to filter on deleted \u003d 0, it might be buried in the dbbroker - you never know...","commit_id":"a2b9026533fd93e2c23eb46723d0dcaab2b2cb8d"}],"swift/account/mem_server.py":[{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1a6a9d96d7e5857ce8bf9d96bf6b4b0ae5fb8610","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2010-2013 OpenStack, LLC."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":4,"context_line":"# you may not use this file except in compliance with the License."}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAXH%2F%2F7rc%3D","line":1,"updated":"2014-04-16 12:47:47.000000000","message":"Not sure about this, but you might add Redhat? (Like in some other license headers)?","commit_id":"6f148fde4fcaae85b8e080778bb54b4b93dd0e07"}],"swift/account/server.py":[{"author":{"_account_id":7223,"name":"Ayal Baron","email":"abaron@redhat.com"},"change_message_id":"d90de62ac9ba324c770b0293e5135f8d3ebbc897","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                if broker.is_status_deleted():"},{"line_number":147,"context_line":"                    return self._deleted_response(broker, req, HTTPForbidden,"},{"line_number":148,"context_line":"                                                  body\u003d\u0027Recently deleted\u0027)"},{"line_number":149,"context_line":"                created \u003d broker.is_deleted()"},{"line_number":150,"context_line":"                broker.update_put_timestamp(timestamp)"},{"line_number":151,"context_line":"                if broker.is_deleted():"},{"line_number":152,"context_line":"                    return HTTPConflict(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2Fzgs%3D","line":149,"updated":"2013-10-09 17:44:44.000000000","message":"again, logic reversed here?","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e0cb33a99b591dd25364e62317cade2f011b56e1","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                if broker.is_status_deleted():"},{"line_number":147,"context_line":"                    return self._deleted_response(broker, req, HTTPForbidden,"},{"line_number":148,"context_line":"                                                  body\u003d\u0027Recently deleted\u0027)"},{"line_number":149,"context_line":"                created \u003d broker.is_deleted()"},{"line_number":150,"context_line":"                broker.update_put_timestamp(timestamp)"},{"line_number":151,"context_line":"                if broker.is_deleted():"},{"line_number":152,"context_line":"                    return HTTPConflict(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2Fcig%3D","line":149,"in_reply_to":"AAAATH%2F%2Fzgs%3D","updated":"2013-10-16 04:08:18.000000000","message":"No, the \"created\u003dis_deleted()\" means that if the following update_put_timestamp() undeletes an already-deleted account, then a 204 is reported. Otherwise it\u0027s just 200 for a metadata update. I agree it looks odd, but actually makes sense.","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"9f3a835e85a0cc54f944424b158ec49943b7d706","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        swift.common.db.DB_PREALLOCATION \u003d \\"},{"line_number":63,"context_line":"            config_true_value(conf.get(\u0027db_preallocation\u0027, \u0027f\u0027))"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _get_account_broker(self, drive, part, account, **kwargs):"},{"line_number":66,"context_line":"        \"\"\""},{"line_number":67,"context_line":"        Get a back-end broker for the container."},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FYRA%3D","line":65,"updated":"2013-11-07 19:34:03.000000000","message":"We want to define this without the leading underscore, like we did for the DiskFile API.","commit_id":"b99fa1881c0651a71e32ac189e0d2345fb6825c9"},{"author":{"_account_id":7652,"name":"Luis Pabón","email":"lpabon@gmail.com","username":"lpabon"},"change_message_id":"9170e8e888f8fc9c0af72ee316a8a30e54645d44","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from eventlet import Timeout"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import swift.common.db"},{"line_number":23,"context_line":"from swift.account.backend import AccountBackend, AccountBroker"},{"line_number":24,"context_line":"from swift.account.utils import account_listing_response"},{"line_number":25,"context_line":"from swift.common.exceptions import EntityConflict, EntityNotExist, \\"},{"line_number":26,"context_line":"    AccountDeleted"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F9td8%3D","line":23,"updated":"2013-12-06 21:29:47.000000000","message":"To be pluggable we could one of two things.  One is to determine where we can import the AccountBackend and AccountBroker classes.\n\n..more below..","commit_id":"14721afbb125156bd8d04e3943eda3c2a9da8f0f"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"c7f34bd78704debc7996f83fc976e8e34543eab6","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        self.logger \u003d logger or get_logger(conf, log_route\u003d\u0027account-server\u0027)"},{"line_number":49,"context_line":"        self.root \u003d conf.get(\u0027devices\u0027, \u0027/srv/node\u0027)"},{"line_number":50,"context_line":"        self.mount_check \u003d config_true_value(conf.get(\u0027mount_check\u0027, \u0027true\u0027))"},{"line_number":51,"context_line":"        replication_server \u003d conf.get(\u0027replication_server\u0027, None)"},{"line_number":52,"context_line":"        if replication_server is not None:"},{"line_number":53,"context_line":"            replication_server \u003d config_true_value(replication_server)"},{"line_number":54,"context_line":"        self.replication_server \u003d replication_server"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F9kz4%3D","line":51,"updated":"2013-12-10 02:48:01.000000000","message":"After discussing this today with Luis and Thiago, I believe we need to get both the AccountController and ContainerController classes to use a setup() method for implementation specific attribute construction. See ObjectController class.","commit_id":"14721afbb125156bd8d04e3943eda3c2a9da8f0f"},{"author":{"_account_id":7652,"name":"Luis Pabón","email":"lpabon@gmail.com","username":"lpabon"},"change_message_id":"9170e8e888f8fc9c0af72ee316a8a30e54645d44","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            config_true_value(conf.get(\u0027db_preallocation\u0027, \u0027f\u0027))"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def get_account_backend(self, drive, part, account, **kwargs):"},{"line_number":64,"context_line":"        \"\"\""},{"line_number":65,"context_line":"        Get a back-end broker for the account."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        :param drive: drive that holds the container"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F9tdk%3D","line":64,"updated":"2013-12-06 21:29:47.000000000","message":"We could also here load the correct class according to some configuration.  Same idea can be applied to Controller, Proxy, and Object.","commit_id":"14721afbb125156bd8d04e3943eda3c2a9da8f0f"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"c7f34bd78704debc7996f83fc976e8e34543eab6","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            config_true_value(conf.get(\u0027db_preallocation\u0027, \u0027f\u0027))"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def get_account_backend(self, drive, part, account, **kwargs):"},{"line_number":64,"context_line":"        \"\"\""},{"line_number":65,"context_line":"        Get a back-end broker for the account."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        :param drive: drive that holds the container"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F9kzc%3D","line":64,"in_reply_to":"AAAATn%2F9lnU%3D","updated":"2013-12-10 02:48:01.000000000","message":"Until we deal with the fact that the proxy server side controllers are fixed, it would be better to do that work in another patch set on top of this and other required changes.","commit_id":"14721afbb125156bd8d04e3943eda3c2a9da8f0f"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"ea03fe0598934d6caa44bd981c783e29d7763226","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            config_true_value(conf.get(\u0027db_preallocation\u0027, \u0027f\u0027))"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def get_account_backend(self, drive, part, account, **kwargs):"},{"line_number":64,"context_line":"        \"\"\""},{"line_number":65,"context_line":"        Get a back-end broker for the account."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        :param drive: drive that holds the container"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAATn%2F9lnU%3D","line":64,"in_reply_to":"AAAATn%2F9tdk%3D","updated":"2013-12-09 22:35:49.000000000","message":"Where have you been when Peter made me to abandon this:\n  https://review.openstack.org/40037","commit_id":"14721afbb125156bd8d04e3943eda3c2a9da8f0f"}],"swift/common/db.py":[{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"52dc3ec3f40fd5b6fc738e11e3821ed8e56795cd","unresolved":false,"context_lines":[{"line_number":236,"context_line":"            tmp_db_file \u003d None"},{"line_number":237,"context_line":"            conn \u003d get_db_connection(self.db_file, self.timeout)"},{"line_number":238,"context_line":"        else:"},{"line_number":239,"context_line":"            # This is checked under a lock below, but this allows to bail"},{"line_number":240,"context_line":"            # quickly, for benchmarks."},{"line_number":241,"context_line":"            if os.path.exists(self.db_file):"},{"line_number":242,"context_line":"                raise DatabaseAlreadyExists(self.db_file)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUX%2F%2BVVo%3D","line":239,"updated":"2014-02-21 20:13:34.000000000","message":"Curious what benchmark conditions and what kind of impact you saw here, seems a little hackish to include as part of this patch set","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e919a666a900036b87e3ee51381565c2616a5fee","unresolved":false,"context_lines":[{"line_number":236,"context_line":"            tmp_db_file \u003d None"},{"line_number":237,"context_line":"            conn \u003d get_db_connection(self.db_file, self.timeout)"},{"line_number":238,"context_line":"        else:"},{"line_number":239,"context_line":"            # This is checked under a lock below, but this allows to bail"},{"line_number":240,"context_line":"            # quickly, for benchmarks."},{"line_number":241,"context_line":"            if os.path.exists(self.db_file):"},{"line_number":242,"context_line":"                raise DatabaseAlreadyExists(self.db_file)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVX%2F%2F%2B3o%3D","line":239,"in_reply_to":"AAAAUX%2F%2BVVo%3D","updated":"2014-02-27 01:34:28.000000000","message":"Once again it\u0027s \"this was done like so before, so\". The orignal code does:\n\n            if account.startswith(self.auto_create_account_prefix) and \\\n                    not os.path.exists(broker.db_file):\n                    broker.initialize(normalize_timestamp(\n                        req.headers.get(\u0027x-timestamp\u0027) or time.time()))\n\nThis is race-prone, so we change it to:\n\n            broker.create()\nor\n            auto_create \u003d account.startswith(self.auto_create_account_prefix)\n            broker.put_container(... ,  auto_create)\n\nOn a filesystem-based backend, it\u0027s an mkdir(). However, to preserve the original code paths, we now that the seemingly extraneous comparison. This may be easier to see by looking at a conventional diff.","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"adc01340b76794051babe881f75f9283fece0cea","unresolved":false,"context_lines":[{"line_number":236,"context_line":"            tmp_db_file \u003d None"},{"line_number":237,"context_line":"            conn \u003d get_db_connection(self.db_file, self.timeout)"},{"line_number":238,"context_line":"        else:"},{"line_number":239,"context_line":"            # This is checked under a lock below, but this allows to bail"},{"line_number":240,"context_line":"            # quickly, for benchmarks."},{"line_number":241,"context_line":"            if os.path.exists(self.db_file):"},{"line_number":242,"context_line":"                raise DatabaseAlreadyExists(self.db_file)"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAWH%2F%2BR5c%3D","line":239,"in_reply_to":"AAAAVX%2F%2F%2B3o%3D","updated":"2014-03-27 21:48:59.000000000","message":"makes more sense now - thanks","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"52dc3ec3f40fd5b6fc738e11e3821ed8e56795cd","unresolved":false,"context_lines":[{"line_number":465,"context_line":""},{"line_number":466,"context_line":"    def get_info(self):"},{"line_number":467,"context_line":"        \"\"\""},{"line_number":468,"context_line":"        Returns a dict. See derivatives for lists of keys."},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"        A side effect of get_info is quaranteening in case of problems."},{"line_number":471,"context_line":"        It is used by auditors."}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUX%2F%2BVWI%3D","line":468,"updated":"2014-02-21 20:13:34.000000000","message":"overloaded by the new broker backend classes?","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e919a666a900036b87e3ee51381565c2616a5fee","unresolved":false,"context_lines":[{"line_number":465,"context_line":""},{"line_number":466,"context_line":"    def get_info(self):"},{"line_number":467,"context_line":"        \"\"\""},{"line_number":468,"context_line":"        Returns a dict. See derivatives for lists of keys."},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"        A side effect of get_info is quaranteening in case of problems."},{"line_number":471,"context_line":"        It is used by auditors."}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVX%2F%2F%2B2s%3D","line":468,"in_reply_to":"AAAAUX%2F%2BVWI%3D","updated":"2014-02-27 01:34:28.000000000","message":"Yes. Luis (and Peter, actually) was clamouring for a place for docstrings.","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"52dc3ec3f40fd5b6fc738e11e3821ed8e56795cd","unresolved":false,"context_lines":[{"line_number":559,"context_line":""},{"line_number":560,"context_line":"    def get_db_version(self, conn):"},{"line_number":561,"context_line":"        \"\"\""},{"line_number":562,"context_line":"        Implemented by both broker types. Baseline code generates a version"},{"line_number":563,"context_line":"        depending on other characteristics of the database: 0 or 1."},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        Currenly only used internaly by the baseline implementation,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUX%2F%2BVUQ%3D","line":562,"updated":"2014-02-21 20:13:34.000000000","message":"looks like this is overloaded by existing broker classes whereas the last item above is overloaded by the new backend classes.  Might be good to add comments on these just to make navigation a bit easier","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e919a666a900036b87e3ee51381565c2616a5fee","unresolved":false,"context_lines":[{"line_number":559,"context_line":""},{"line_number":560,"context_line":"    def get_db_version(self, conn):"},{"line_number":561,"context_line":"        \"\"\""},{"line_number":562,"context_line":"        Implemented by both broker types. Baseline code generates a version"},{"line_number":563,"context_line":"        depending on other characteristics of the database: 0 or 1."},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        Currenly only used internaly by the baseline implementation,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVX%2F%2F%2B2c%3D","line":562,"in_reply_to":"AAAAUX%2F%2BVUQ%3D","updated":"2014-02-27 01:34:28.000000000","message":"I don\u0027t quite understand how comments would help, I mean aside from the one 2 paragraphs below, about this not beling a part of API. We could add an underscore to the function name, if that helps.","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"adc01340b76794051babe881f75f9283fece0cea","unresolved":false,"context_lines":[{"line_number":559,"context_line":""},{"line_number":560,"context_line":"    def get_db_version(self, conn):"},{"line_number":561,"context_line":"        \"\"\""},{"line_number":562,"context_line":"        Implemented by both broker types. Baseline code generates a version"},{"line_number":563,"context_line":"        depending on other characteristics of the database: 0 or 1."},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        Currenly only used internaly by the baseline implementation,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAWH%2F%2BR44%3D","line":562,"in_reply_to":"AAAAVX%2F%2F%2B2c%3D","updated":"2014-03-27 21:48:59.000000000","message":"nah, just my newness to the patch I guess","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"}],"swift/common/exceptions.py":[{"author":{"_account_id":7223,"name":"Ayal Baron","email":"abaron@redhat.com"},"change_message_id":"d90de62ac9ba324c770b0293e5135f8d3ebbc897","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    pass"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class EntityAlreadyDeleted(Exception):"},{"line_number":62,"context_line":"    pass"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FzwY%3D","line":61,"updated":"2013-10-09 17:44:44.000000000","message":"s/EntityAlreadyDeleted/EntityNotFound/ ?","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e0cb33a99b591dd25364e62317cade2f011b56e1","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    pass"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class EntityAlreadyDeleted(Exception):"},{"line_number":62,"context_line":"    pass"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FciE%3D","line":61,"in_reply_to":"AAAATH%2F%2FzwY%3D","updated":"2013-10-16 04:08:18.000000000","message":"Done","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":7223,"name":"Ayal Baron","email":"abaron@redhat.com"},"change_message_id":"d90de62ac9ba324c770b0293e5135f8d3ebbc897","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"class EntityNotEmpty(Exception):"},{"line_number":71,"context_line":"    \"\"\"Deleting an non-empty entity.\"\"\""},{"line_number":72,"context_line":"    pass"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FzwM%3D","line":71,"updated":"2013-10-09 17:44:44.000000000","message":"s/an/a/","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e0cb33a99b591dd25364e62317cade2f011b56e1","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"class EntityNotEmpty(Exception):"},{"line_number":71,"context_line":"    \"\"\"Deleting an non-empty entity.\"\"\""},{"line_number":72,"context_line":"    pass"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FciM%3D","line":71,"in_reply_to":"AAAATH%2F%2FzwM%3D","updated":"2013-10-16 04:08:18.000000000","message":"Done","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"9f3a835e85a0cc54f944424b158ec49943b7d706","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    pass"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class EntityNotExist(Exception):"},{"line_number":70,"context_line":"    \"\"\"Broker refers to a non-existing or deleted entity\"\"\""},{"line_number":71,"context_line":"    pass"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FYQ4%3D","line":69,"updated":"2013-11-07 19:34:03.000000000","message":"How \u0027come all these exceptions, from line 69 - 89 are not SwiftException subclasses?","commit_id":"b99fa1881c0651a71e32ac189e0d2345fb6825c9"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"4d960b84802cebf1e73938827f8f951ac5f28d67","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    pass"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class EntityNotExist(Exception):"},{"line_number":70,"context_line":"    \"\"\"Broker refers to a non-existing or deleted entity\"\"\""},{"line_number":71,"context_line":"    pass"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2BeMA%3D","line":69,"in_reply_to":"AAAATn%2F%2FYEM%3D","updated":"2013-11-25 18:08:17.000000000","message":"To be consistent, unless there is a good reason to not follow what was done in the past.","commit_id":"b99fa1881c0651a71e32ac189e0d2345fb6825c9"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"ee3ac60df9106fb963666e08d4956346bdb9a9cd","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    pass"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"class EntityNotExist(Exception):"},{"line_number":70,"context_line":"    \"\"\"Broker refers to a non-existing or deleted entity\"\"\""},{"line_number":71,"context_line":"    pass"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FYEM%3D","line":69,"in_reply_to":"AAAATn%2F%2FYQ4%3D","updated":"2013-11-07 22:08:01.000000000","message":"I don\u0027t understand the significance of SwiftException. We do not catch anywhere, so it\u0027s purely stylistic sugar that marks \"our\" exceptions... But to what end?","commit_id":"b99fa1881c0651a71e32ac189e0d2345fb6825c9"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"52dc3ec3f40fd5b6fc738e11e3821ed8e56795cd","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"class EntityNotExist(SwiftException):"},{"line_number":73,"context_line":"    \"\"\"The Back-end broker refers to a non-existing or deleted entity\"\"\""},{"line_number":74,"context_line":"    pass"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUX%2F%2BVRY%3D","line":73,"updated":"2014-02-21 20:13:34.000000000","message":"this won\u0027t cause potential confusion with other areas of the code that are moving to/are using the notion of a \"back end\" (like diskfile).  Would be clearer if these messages said \"DB back-end broker\" or something other than DB if you think that implies too much - something that indicates these are brokers for managing information","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e919a666a900036b87e3ee51381565c2616a5fee","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"class EntityNotExist(SwiftException):"},{"line_number":73,"context_line":"    \"\"\"The Back-end broker refers to a non-existing or deleted entity\"\"\""},{"line_number":74,"context_line":"    pass"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVX%2F%2F%2B1Y%3D","line":73,"in_reply_to":"AAAAUX%2F%2BVRY%3D","updated":"2014-02-27 01:34:28.000000000","message":"Oh yeah, that\u0027s exactly where it all started, and then people were \"this is not a DB! No no no nooooooo\" and were very militant about it. Well, mostly Ayal was (he\u0027s a senior engineer and a manager at RHT who did some reviewing of this code). I had to purge \"db\" from everywhere.\n\nThere\u0027s a lot of verbal contortions all around... Luis was really against using the word \"pluggable\", because the code as it is does not actually preloads (as my get_broker() patch would, but it was postponed to make this patch smaller).","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"adc01340b76794051babe881f75f9283fece0cea","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"class EntityNotExist(SwiftException):"},{"line_number":73,"context_line":"    \"\"\"The Back-end broker refers to a non-existing or deleted entity\"\"\""},{"line_number":74,"context_line":"    pass"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAWH%2F%2BR4o%3D","line":73,"in_reply_to":"AAAAVX%2F%2F%2B1Y%3D","updated":"2014-03-27 21:48:59.000000000","message":"heh, that\u0027s funny.  thanks","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"}],"swift/common/mem_utils.py":[{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"16e686714e5d4177df867568f5aa5a1b5c1666f9","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"# This is separate from swift.common.utils in order to pretend to be"},{"line_number":3,"context_line":"# an out-of-tree module. We do not want to be saddled with exporting"},{"line_number":4,"context_line":"# this stuff out of swift.common.utls forever."}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAUH%2F9ykw%3D","line":1,"updated":"2014-02-03 23:18:43.000000000","message":"I think you still need the copyright headers and such.","commit_id":"264b2f7acbdf132a2a59602e6a0dc00254f47e98"}],"swift/container/backend.py":[{"author":{"_account_id":7223,"name":"Ayal Baron","email":"abaron@redhat.com"},"change_message_id":"d90de62ac9ba324c770b0293e5135f8d3ebbc897","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        :raises EntityConflict: external interference precluded success"},{"line_number":176,"context_line":"        \"\"\""},{"line_number":177,"context_line":"        if not os.path.exists(self.db_file):"},{"line_number":178,"context_line":"            raise EntityNotInitialized()"},{"line_number":179,"context_line":"        if not self.empty():"},{"line_number":180,"context_line":"            raise EntityNotEmpty()"},{"line_number":181,"context_line":"        existed \u003d float(self.get_info()[\u0027put_timestamp\u0027]) and \\"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FzsE%3D","line":178,"updated":"2013-10-09 17:44:44.000000000","message":"is_deleted already tests this and returns True, why raise an exception here? and even if so, why not AlreadyDeleted? (in fact EntityNotFound imo)","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e0cb33a99b591dd25364e62317cade2f011b56e1","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        :raises EntityConflict: external interference precluded success"},{"line_number":176,"context_line":"        \"\"\""},{"line_number":177,"context_line":"        if not os.path.exists(self.db_file):"},{"line_number":178,"context_line":"            raise EntityNotInitialized()"},{"line_number":179,"context_line":"        if not self.empty():"},{"line_number":180,"context_line":"            raise EntityNotEmpty()"},{"line_number":181,"context_line":"        existed \u003d float(self.get_info()[\u0027put_timestamp\u0027]) and \\"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2Fcf4%3D","line":178,"in_reply_to":"AAAATH%2F%2FzsE%3D","updated":"2013-10-16 04:08:18.000000000","message":"The difference is, as much as I can see, that account is not updated when uninitialized container is being deleted. It probably avoids a kind of an update-delete race, although as we know from bz#1013594 it\u0027s not water-tight.","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":7223,"name":"Ayal Baron","email":"abaron@redhat.com"},"change_message_id":"d90de62ac9ba324c770b0293e5135f8d3ebbc897","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            raise EntityNotInitialized()"},{"line_number":179,"context_line":"        if not self.empty():"},{"line_number":180,"context_line":"            raise EntityNotEmpty()"},{"line_number":181,"context_line":"        existed \u003d float(self.get_info()[\u0027put_timestamp\u0027]) and \\"},{"line_number":182,"context_line":"            not self.is_deleted()"},{"line_number":183,"context_line":"        self.delete_db(timestamp)"},{"line_number":184,"context_line":"        # XXX Not sure how this can happen."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2Fzq4%3D","line":181,"updated":"2013-10-09 17:44:44.000000000","message":"Personally I\u0027m more in favor of trying to delete rather than checking for existence before deleting","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"7cfb3ac57bc0e007478877b0e19fe5f10cb114e4","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        existed \u003d float(self.get_info()[\u0027put_timestamp\u0027]) and \\"},{"line_number":182,"context_line":"            not self.is_deleted()"},{"line_number":183,"context_line":"        self.delete_db(timestamp)"},{"line_number":184,"context_line":"        # XXX Not sure how this can happen."},{"line_number":185,"context_line":"        if not self.is_deleted():"},{"line_number":186,"context_line":"            raise EntityConflict()"},{"line_number":187,"context_line":"        return existed"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2Fztw%3D","line":184,"updated":"2013-10-09 17:37:20.000000000","message":"Investigate how delete_db may not succeed.","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":7223,"name":"Ayal Baron","email":"abaron@redhat.com"},"change_message_id":"d90de62ac9ba324c770b0293e5135f8d3ebbc897","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            not self.is_deleted()"},{"line_number":183,"context_line":"        self.delete_db(timestamp)"},{"line_number":184,"context_line":"        # XXX Not sure how this can happen."},{"line_number":185,"context_line":"        if not self.is_deleted():"},{"line_number":186,"context_line":"            raise EntityConflict()"},{"line_number":187,"context_line":"        return existed"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FzvE%3D","line":185,"updated":"2013-10-09 17:44:44.000000000","message":"why bother even checking this here?","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"56811634ca03aaa2e10fb02a8387bf3380f89aaa","unresolved":false,"context_lines":[{"line_number":252,"context_line":"    def is_deleted(self, timestamp\u003dNone):"},{"line_number":253,"context_line":"        \"\"\""},{"line_number":254,"context_line":"        Check if the DB is considered to be deleted."},{"line_number":255,"context_line":"        Not a part of Pluggable Back-ends, internal to the baseline code."},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        :returns: True if the DB is considered to be deleted, False otherwise"},{"line_number":258,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F%2BXz0%3D","line":255,"updated":"2013-11-26 20:41:40.000000000","message":"Given this method is for the internal broker, do we need this comment?","commit_id":"4bb7f04fcc7f7884055fb5733f8503418da55c4d"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"f5e1a6dc98d837f829a1fe297774c93ab4e58761","unresolved":false,"context_lines":[{"line_number":252,"context_line":"    def is_deleted(self, timestamp\u003dNone):"},{"line_number":253,"context_line":"        \"\"\""},{"line_number":254,"context_line":"        Check if the DB is considered to be deleted."},{"line_number":255,"context_line":"        Not a part of Pluggable Back-ends, internal to the baseline code."},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        :returns: True if the DB is considered to be deleted, False otherwise"},{"line_number":258,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F99jI%3D","line":255,"in_reply_to":"AAAATn%2F%2BXz0%3D","updated":"2013-12-03 23:50:54.000000000","message":"Done","commit_id":"4bb7f04fcc7f7884055fb5733f8503418da55c4d"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"52dc3ec3f40fd5b6fc738e11e3821ed8e56795cd","unresolved":false,"context_lines":[{"line_number":518,"context_line":""},{"line_number":519,"context_line":"class ContainerBackend(ContainerBroker):"},{"line_number":520,"context_line":"    \"\"\""},{"line_number":521,"context_line":"    Encapsulates working with a container database."},{"line_number":522,"context_line":""},{"line_number":523,"context_line":"    :param path: Path to devices on the node"},{"line_number":524,"context_line":"    :param device: Device name"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUX%2F%2BVQM%3D","line":521,"updated":"2014-02-21 20:13:34.000000000","message":"bit of a nit but in the account broker class I think you used the word \u0027entity\u0027 which is one of the reasons I asked what else you might have in mind for a back end.  Here you use the word database.","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e919a666a900036b87e3ee51381565c2616a5fee","unresolved":false,"context_lines":[{"line_number":518,"context_line":""},{"line_number":519,"context_line":"class ContainerBackend(ContainerBroker):"},{"line_number":520,"context_line":"    \"\"\""},{"line_number":521,"context_line":"    Encapsulates working with a container database."},{"line_number":522,"context_line":""},{"line_number":523,"context_line":"    :param path: Path to devices on the node"},{"line_number":524,"context_line":"    :param device: Device name"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVX%2F%2F%2B0U%3D","line":521,"in_reply_to":"AAAAUX%2F%2BVQM%3D","updated":"2014-02-27 01:34:28.000000000","message":"But this is a specific implementation that uses databases, isn\u0027t it? I\u0027ll try to elaborate.","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"adc01340b76794051babe881f75f9283fece0cea","unresolved":false,"context_lines":[{"line_number":518,"context_line":""},{"line_number":519,"context_line":"class ContainerBackend(ContainerBroker):"},{"line_number":520,"context_line":"    \"\"\""},{"line_number":521,"context_line":"    Encapsulates working with a container database."},{"line_number":522,"context_line":""},{"line_number":523,"context_line":"    :param path: Path to devices on the node"},{"line_number":524,"context_line":"    :param device: Device name"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAWH%2F%2BR4g%3D","line":521,"in_reply_to":"AAAAVX%2F%2F%2B0U%3D","updated":"2014-03-27 21:48:59.000000000","message":"good point, never mind","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"52dc3ec3f40fd5b6fc738e11e3821ed8e56795cd","unresolved":false,"context_lines":[{"line_number":576,"context_line":"            not self.is_deleted()"},{"line_number":577,"context_line":"        self.delete_db(timestamp)"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":"        # XXX Historic behaviour of baseline. Not sure how this can happen."},{"line_number":580,"context_line":"        if not self.is_deleted():"},{"line_number":581,"context_line":"            raise EntityConflict()"},{"line_number":582,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUX%2F%2BVPw%3D","line":579,"updated":"2014-02-21 20:13:34.000000000","message":"if this isn\u0027t shown as being covered in testing and nobody knows why its here are you planning on removing?","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e919a666a900036b87e3ee51381565c2616a5fee","unresolved":false,"context_lines":[{"line_number":576,"context_line":"            not self.is_deleted()"},{"line_number":577,"context_line":"        self.delete_db(timestamp)"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":"        # XXX Historic behaviour of baseline. Not sure how this can happen."},{"line_number":580,"context_line":"        if not self.is_deleted():"},{"line_number":581,"context_line":"            raise EntityConflict()"},{"line_number":582,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVX%2F%2F%2BzM%3D","line":579,"in_reply_to":"AAAAUX%2F%2BVPw%3D","updated":"2014-02-27 01:34:28.000000000","message":"This may be happening if there\u0027s some kind of a race. Our existing code contains it, and I cannot prove analytically that it never happens. Honestly I hope that transactional nature of SQLite prevents it, but I\u0027m not sure.","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"52dc3ec3f40fd5b6fc738e11e3821ed8e56795cd","unresolved":false,"context_lines":[{"line_number":606,"context_line":""},{"line_number":607,"context_line":"    def create(self, timestamp, metadata):"},{"line_number":608,"context_line":"        \"\"\""},{"line_number":609,"context_line":"        Create the container."},{"line_number":610,"context_line":""},{"line_number":611,"context_line":"        :param timestamp: creation for container"},{"line_number":612,"context_line":"        :param metadata: metadata to be initially associated with the container"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUX%2F%2BVPM%3D","line":609,"updated":"2014-02-21 20:13:34.000000000","message":"again just a nit but with both acct and container you leave off the word \"DB\" or \"entity\" a lot in comments - not sure if these comments are auto-read into some docs somewhere but a comment that says \"Crate the container\" can be a little confusing since this isn\u0027t creating \"a container\" as most people would think about it (could be confused with the PUT handler in the container server is what I mean)","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e919a666a900036b87e3ee51381565c2616a5fee","unresolved":false,"context_lines":[{"line_number":606,"context_line":""},{"line_number":607,"context_line":"    def create(self, timestamp, metadata):"},{"line_number":608,"context_line":"        \"\"\""},{"line_number":609,"context_line":"        Create the container."},{"line_number":610,"context_line":""},{"line_number":611,"context_line":"        :param timestamp: creation for container"},{"line_number":612,"context_line":"        :param metadata: metadata to be initially associated with the container"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVX%2F%2F%2By4%3D","line":609,"in_reply_to":"AAAAUX%2F%2BVPM%3D","updated":"2014-02-27 01:34:28.000000000","message":"The create() method really is the meat of PUT handler, isn\u0027t it?","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"adc01340b76794051babe881f75f9283fece0cea","unresolved":false,"context_lines":[{"line_number":606,"context_line":""},{"line_number":607,"context_line":"    def create(self, timestamp, metadata):"},{"line_number":608,"context_line":"        \"\"\""},{"line_number":609,"context_line":"        Create the container."},{"line_number":610,"context_line":""},{"line_number":611,"context_line":"        :param timestamp: creation for container"},{"line_number":612,"context_line":"        :param metadata: metadata to be initially associated with the container"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAWH%2F%2BR3o%3D","line":609,"in_reply_to":"AAAAVX%2F%2F%2By4%3D","updated":"2014-03-27 21:48:59.000000000","message":"yeah, never mind","commit_id":"14641ebfed4fe516dfd02724fd1f1d4280cb5f76"}],"swift/container/server.py":[{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"04092ae01ed57ba43c0823dd5eeacedba73cb11f","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                return HTTPNotFound()"},{"line_number":215,"context_line":"            except EntityNotEmpty:"},{"line_number":216,"context_line":"                return HTTPConflict(request\u003dreq)"},{"line_number":217,"context_line":"            except EntityConflict:"},{"line_number":218,"context_line":"                return HTTPConflict(request\u003dreq)"},{"line_number":219,"context_line":"            resp \u003d self.account_update(req, account, container, broker)"},{"line_number":220,"context_line":"            if resp:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAS3%2F%2FX5s%3D","line":217,"updated":"2013-09-27 22:11:54.000000000","message":"should these 2 except clauses be combined?\n\nexcept (EntityNotEmpty, EntityConflict):\n    return HttpConflict(request\u003dreq)","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"3d058d8b7a679f4ebafc057d0c6371837986f6b1","unresolved":false,"context_lines":[{"line_number":214,"context_line":"                return HTTPNotFound()"},{"line_number":215,"context_line":"            except EntityNotEmpty:"},{"line_number":216,"context_line":"                return HTTPConflict(request\u003dreq)"},{"line_number":217,"context_line":"            except EntityConflict:"},{"line_number":218,"context_line":"                return HTTPConflict(request\u003dreq)"},{"line_number":219,"context_line":"            resp \u003d self.account_update(req, account, container, broker)"},{"line_number":220,"context_line":"            if resp:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAS3%2F%2FXvg%3D","line":217,"in_reply_to":"AAAAS3%2F%2FX5s%3D","updated":"2013-09-27 22:44:02.000000000","message":"Done","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":7223,"name":"Ayal Baron","email":"abaron@redhat.com"},"change_message_id":"d90de62ac9ba324c770b0293e5135f8d3ebbc897","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            resp \u003d self.account_update(req, account, container, broker)"},{"line_number":220,"context_line":"            if resp:"},{"line_number":221,"context_line":"                return resp"},{"line_number":222,"context_line":"            if existed:"},{"line_number":223,"context_line":"                return HTTPNoContent(request\u003dreq)"},{"line_number":224,"context_line":"            return HTTPNotFound()"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FzoU%3D","line":222,"updated":"2013-10-09 17:44:44.000000000","message":"Not really related to this patch, but personally the existed semantics seem funky, any real reason for keeping it?","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e0cb33a99b591dd25364e62317cade2f011b56e1","unresolved":false,"context_lines":[{"line_number":219,"context_line":"            resp \u003d self.account_update(req, account, container, broker)"},{"line_number":220,"context_line":"            if resp:"},{"line_number":221,"context_line":"                return resp"},{"line_number":222,"context_line":"            if existed:"},{"line_number":223,"context_line":"                return HTTPNoContent(request\u003dreq)"},{"line_number":224,"context_line":"            return HTTPNotFound()"},{"line_number":225,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FcfI%3D","line":222,"in_reply_to":"AAAATH%2F%2FzoU%3D","updated":"2013-10-16 04:08:18.000000000","message":"Keeping to facilitate review: easier to transmogrify this (\"refactor\" as Peter says), then change in-palce separately. But this goes on my TODO list. Heartbreaking, but I added an \"XXX\" marker into comment.","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":7223,"name":"Ayal Baron","email":"abaron@redhat.com"},"change_message_id":"d90de62ac9ba324c770b0293e5135f8d3ebbc897","unresolved":false,"context_lines":[{"line_number":259,"context_line":"            try:"},{"line_number":260,"context_line":"                broker.initialize(timestamp)"},{"line_number":261,"context_line":"                created \u003d True"},{"line_number":262,"context_line":"            except DatabaseAlreadyExists:"},{"line_number":263,"context_line":"                created \u003d broker.is_deleted()"},{"line_number":264,"context_line":"                broker.update_put_timestamp(timestamp)"},{"line_number":265,"context_line":"                if broker.is_deleted():"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FznE%3D","line":262,"updated":"2013-10-09 17:44:44.000000000","message":"probably not related to this patch, but shouldn\u0027t this be BrokerAlreadyExists?","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e0cb33a99b591dd25364e62317cade2f011b56e1","unresolved":false,"context_lines":[{"line_number":259,"context_line":"            try:"},{"line_number":260,"context_line":"                broker.initialize(timestamp)"},{"line_number":261,"context_line":"                created \u003d True"},{"line_number":262,"context_line":"            except DatabaseAlreadyExists:"},{"line_number":263,"context_line":"                created \u003d broker.is_deleted()"},{"line_number":264,"context_line":"                broker.update_put_timestamp(timestamp)"},{"line_number":265,"context_line":"                if broker.is_deleted():"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FcYc%3D","line":262,"in_reply_to":"AAAATH%2F%2FznE%3D","updated":"2013-10-16 04:08:18.000000000","message":"Awww, this requires exception trampolining in broker.initialize, when sqlite3 throws DatabaseAlreadyExists. But it makes sense. There\u0027s no database anymore in the API.\n\nNote that lower levels can throw additional exceptions easily, like ValueError, OSError. They all end in a 500 response though. We only catch this specific one.","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":7223,"name":"Ayal Baron","email":"abaron@redhat.com"},"change_message_id":"d90de62ac9ba324c770b0293e5135f8d3ebbc897","unresolved":false,"context_lines":[{"line_number":260,"context_line":"                broker.initialize(timestamp)"},{"line_number":261,"context_line":"                created \u003d True"},{"line_number":262,"context_line":"            except DatabaseAlreadyExists:"},{"line_number":263,"context_line":"                created \u003d broker.is_deleted()"},{"line_number":264,"context_line":"                broker.update_put_timestamp(timestamp)"},{"line_number":265,"context_line":"                if broker.is_deleted():"},{"line_number":266,"context_line":"                    return HTTPConflict(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2Fzms%3D","line":263,"updated":"2013-10-09 17:44:44.000000000","message":"cmiiw, but I think you reversed the logic here.  Previously we wouldn\u0027t have reached this point if DatabaseAlreadyExists was thrown, now we reach it only in this scenario.","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"e0cb33a99b591dd25364e62317cade2f011b56e1","unresolved":false,"context_lines":[{"line_number":260,"context_line":"                broker.initialize(timestamp)"},{"line_number":261,"context_line":"                created \u003d True"},{"line_number":262,"context_line":"            except DatabaseAlreadyExists:"},{"line_number":263,"context_line":"                created \u003d broker.is_deleted()"},{"line_number":264,"context_line":"                broker.update_put_timestamp(timestamp)"},{"line_number":265,"context_line":"                if broker.is_deleted():"},{"line_number":266,"context_line":"                    return HTTPConflict(request\u003dreq)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATH%2F%2FcY0%3D","line":263,"in_reply_to":"AAAATH%2F%2Fzms%3D","updated":"2013-10-16 04:08:18.000000000","message":"Actually, previously we reached this point if database file existed, no matter if DatabaseAlreadyExists was to be thrown or not. So the change folds the check into initialize().\n\nNote that we fix a bug here along the way. DatabaseAlreadyExists were thrown (due to a race), we would traceback with \"created\" variable unset.","commit_id":"6d701768dcc968e0786a915f2f1dafdc37cd4799"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"9f3a835e85a0cc54f944424b158ec49943b7d706","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        swift.common.db.DB_PREALLOCATION \u003d \\"},{"line_number":79,"context_line":"            config_true_value(conf.get(\u0027db_preallocation\u0027, \u0027f\u0027))"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def _get_container_broker(self, drive, part, account, container, **kwargs):"},{"line_number":82,"context_line":"        \"\"\""},{"line_number":83,"context_line":"        Get a back-end broker for the container."},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2FYQs%3D","line":81,"updated":"2013-11-07 19:34:03.000000000","message":"Can we drop the leading underscore since this will be a public API? And call this \"get_container_backend()\"?","commit_id":"b99fa1881c0651a71e32ac189e0d2345fb6825c9"}]}
