)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5046,"name":"Lance Bragstad","email":"lbragstad@redhat.com","username":"ldbragst"},"change_message_id":"9c432a21e6f00ebab8ba5969b01f555561235f76","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Correct token flush logging"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The log message for the batch size was at info leve, but no admin"},{"line_number":10,"context_line":"is interested in this message. Also, the debug message for the"},{"line_number":11,"context_line":"tokens removed so far was a little confusing, so clarified it."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a890539_039e4b56","line":9,"updated":"2014-11-13 15:19:45.000000000","message":"level*","commit_id":"d9a9456cb16981d490278e354bff1aa6f40beb32"}],"keystone/token/persistence/backends/sql.py":[{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"8e967790d55ae5fc05e7ac3528a3e86e9e81e2eb","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    # It\u0027s expected that the caller will then delete all rows with a timestamp"},{"line_number":61,"context_line":"    # equal to or older than the one yielded.  This may delete slightly more"},{"line_number":62,"context_line":"    # tokens than the batch_size, but that should be ok in almost all cases."},{"line_number":63,"context_line":"    LOG.debug(\u0027Token expiration batch size: %d\u0027 % batch_size)"},{"line_number":64,"context_line":"    query \u003d session.query(TokenModel.expires)"},{"line_number":65,"context_line":"    query \u003d query.filter(TokenModel.expires \u003c upper_bound_func())"},{"line_number":66,"context_line":"    query \u003d query.order_by(TokenModel.expires)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_101d86be","line":63,"updated":"2014-11-24 11:38:45.000000000","message":"could just pass batch_size as argument to debug() rather than doing the string formatting here. (similar to the other change)","commit_id":"ee1d2ef1089fd74e13189a0ffb90017388adec43"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"802753d5cf87e8a7b7d9145ee55d54692e74f221","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    # It\u0027s expected that the caller will then delete all rows with a timestamp"},{"line_number":61,"context_line":"    # equal to or older than the one yielded.  This may delete slightly more"},{"line_number":62,"context_line":"    # tokens than the batch_size, but that should be ok in almost all cases."},{"line_number":63,"context_line":"    LOG.debug(\u0027Token expiration batch size: %d\u0027 % batch_size)"},{"line_number":64,"context_line":"    query \u003d session.query(TokenModel.expires)"},{"line_number":65,"context_line":"    query \u003d query.filter(TokenModel.expires \u003c upper_bound_func())"},{"line_number":66,"context_line":"    query \u003d query.order_by(TokenModel.expires)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a890539_2dd14457","line":63,"in_reply_to":"5a890539_101d86be","updated":"2014-11-24 13:27:51.000000000","message":"Done","commit_id":"ee1d2ef1089fd74e13189a0ffb90017388adec43"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"bc15a455ffdfff9878bb809eef45600b0d9b9aca","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                                        expiry_time)"},{"line_number":274,"context_line":"            row_count \u003d delete_query.delete(synchronize_session\u003dFalse)"},{"line_number":275,"context_line":"            total_removed +\u003d row_count"},{"line_number":276,"context_line":"            LOG.debug(\u0027Removed %d total expired tokens\u0027, total_removed)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        session.flush()"},{"line_number":279,"context_line":"        LOG.info(_LI(\u0027Total expired tokens removed: %d\u0027), total_removed)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_27a9017c","line":276,"updated":"2014-12-15 23:19:19.000000000","message":"I can abandon my patch,  Please fix line 276.  It should be row_count and not total_removed.   total_removed is at line 279\n\nhttps://review.openstack.org/#/c/140790/","commit_id":"a077a875dd50974b66895f7d1ac39097d208e33a"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"84ae4705d51e0ffd6776bad94e9be39e24bdd9e8","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                                        expiry_time)"},{"line_number":274,"context_line":"            row_count \u003d delete_query.delete(synchronize_session\u003dFalse)"},{"line_number":275,"context_line":"            total_removed +\u003d row_count"},{"line_number":276,"context_line":"            LOG.debug(\u0027Removed %d total expired tokens\u0027, total_removed)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        session.flush()"},{"line_number":279,"context_line":"        LOG.info(_LI(\u0027Total expired tokens removed: %d\u0027), total_removed)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_62ae4583","line":276,"in_reply_to":"3a961159_02fca1b4","updated":"2015-01-13 17:15:27.000000000","message":"For debug purposes it\u0027s nice to see that progress is being made and also the pace of the progress. I made use of this to figure out a problem.","commit_id":"a077a875dd50974b66895f7d1ac39097d208e33a"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"5f854f2deb90f22f4ec0360b988e2cd854eadd81","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                                        expiry_time)"},{"line_number":274,"context_line":"            row_count \u003d delete_query.delete(synchronize_session\u003dFalse)"},{"line_number":275,"context_line":"            total_removed +\u003d row_count"},{"line_number":276,"context_line":"            LOG.debug(\u0027Removed %d total expired tokens\u0027, total_removed)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        session.flush()"},{"line_number":279,"context_line":"        LOG.info(_LI(\u0027Total expired tokens removed: %d\u0027), total_removed)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_22e3af34","line":276,"in_reply_to":"3a961159_07e405ab","updated":"2014-12-15 23:46:56.000000000","message":"row_count is not always 1000.  \n\nIf you look at the comment at Line 61, it is slightly less than 1000. Also if the number of tokens is less than 1000, then it will be different.\n\nIf you create lot of tokens in same seconds, it will  never be 1000.\ne.g  If we repeat the test given in this bug https://review.openstack.org/#/c/135118/ , it will never be 1000\n\nI still don\u0027t understand why do we need to log total_removed at line 276. It should be row_count.\n\ne.g I have to manually change the code to  log row_count to debug this problem:  https://bugs.launchpad.net/tripleo/+bug/1402795","commit_id":"a077a875dd50974b66895f7d1ac39097d208e33a"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"2833cb2842a847ca395390a2092730e30766365c","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                                        expiry_time)"},{"line_number":274,"context_line":"            row_count \u003d delete_query.delete(synchronize_session\u003dFalse)"},{"line_number":275,"context_line":"            total_removed +\u003d row_count"},{"line_number":276,"context_line":"            LOG.debug(\u0027Removed %d total expired tokens\u0027, total_removed)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        session.flush()"},{"line_number":279,"context_line":"        LOG.info(_LI(\u0027Total expired tokens removed: %d\u0027), total_removed)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_42d27b35","line":276,"in_reply_to":"3a961159_22e3af34","updated":"2014-12-15 23:56:30.000000000","message":"In order to figure out the number of tokens that were removed in the last call, compare the last 2 numbers. You can tell how many have been removed so far by looking at the last number.\n\nIf this was printing out the row_count, in order to figure out out many have been removed so far you have to add up all the debug statements printed so far. This is not as useful.","commit_id":"a077a875dd50974b66895f7d1ac39097d208e33a"},{"author":{"_account_id":9142,"name":"Samuel de Medeiros Queiroz","email":"samueldmq@lsd.ufcg.edu.br","username":"samuel-z","inactive":true},"change_message_id":"e45f0b5d27006a0d32c60ddfae523380d5c5e293","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                                        expiry_time)"},{"line_number":274,"context_line":"            row_count \u003d delete_query.delete(synchronize_session\u003dFalse)"},{"line_number":275,"context_line":"            total_removed +\u003d row_count"},{"line_number":276,"context_line":"            LOG.debug(\u0027Removed %d total expired tokens\u0027, total_removed)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        session.flush()"},{"line_number":279,"context_line":"        LOG.info(_LI(\u0027Total expired tokens removed: %d\u0027), total_removed)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_a71091a9","line":276,"in_reply_to":"3a961159_27a9017c","updated":"2014-12-15 23:28:28.000000000","message":"I think we should either i) debug expired tokens per expiry_time, as Haneed said, but adding expiry_time info to debug, otherwise it will be useless, since we don\u0027t know any information about exactly why that amount of expired tokens were removed; or ii) just remove this, since we log total_removed at line 279.","commit_id":"a077a875dd50974b66895f7d1ac39097d208e33a"},{"author":{"_account_id":6486,"name":"Brant Knudson","email":"blk@acm.org","username":"blk-u"},"change_message_id":"15e1d41b4db8429db6c18f5ca84d4834d59b7ddb","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                                        expiry_time)"},{"line_number":274,"context_line":"            row_count \u003d delete_query.delete(synchronize_session\u003dFalse)"},{"line_number":275,"context_line":"            total_removed +\u003d row_count"},{"line_number":276,"context_line":"            LOG.debug(\u0027Removed %d total expired tokens\u0027, total_removed)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        session.flush()"},{"line_number":279,"context_line":"        LOG.info(_LI(\u0027Total expired tokens removed: %d\u0027), total_removed)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_07e405ab","line":276,"in_reply_to":"3a961159_27a9017c","updated":"2014-12-15 23:33:45.000000000","message":"row_count is always the same number so I don\u0027t see the point in logging it. The total removed at the end is logged at info level since that\u0027s when it\u0027s done.","commit_id":"a077a875dd50974b66895f7d1ac39097d208e33a"},{"author":{"_account_id":7725,"name":"David Stanek","email":"dstanek@dstanek.com","username":"dstanek"},"change_message_id":"972d8f6a76354e4ab42fc75f776a819ad92f2325","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                                        expiry_time)"},{"line_number":274,"context_line":"            row_count \u003d delete_query.delete(synchronize_session\u003dFalse)"},{"line_number":275,"context_line":"            total_removed +\u003d row_count"},{"line_number":276,"context_line":"            LOG.debug(\u0027Removed %d total expired tokens\u0027, total_removed)"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"        session.flush()"},{"line_number":279,"context_line":"        LOG.info(_LI(\u0027Total expired tokens removed: %d\u0027), total_removed)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_02fca1b4","line":276,"in_reply_to":"3a961159_42d27b35","updated":"2015-01-13 17:10:29.000000000","message":"Is there any reason we log this in every iteration of the loop instead of just relying of the log statement a few lines down?","commit_id":"a077a875dd50974b66895f7d1ac39097d208e33a"}]}
