)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"37b10485ee765c4f641023cc8813fefb70339c0c","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make Journal thread class a singleton"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Due to [1] each Python process only runs a single instance of a journal"},{"line_number":10,"context_line":"thread simultaneously."},{"line_number":11,"context_line":"There\u0027s really no sense in more than one journal class running in a"},{"line_number":12,"context_line":"given process so changed the journal thread class to be a singleton."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The journal thread is already set to run either on an event fired after"},{"line_number":15,"context_line":"an entry has been created or on a set timer. It is also processing all"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"7f231b9d_03c4c3f3","line":12,"range":{"start_line":9,"start_character":0,"end_line":12,"end_character":68},"updated":"2017-06-17 00:31:19.000000000","message":"This isn\u0027t correct because openstack adopts eventlet which is greenthread and monkeypatches to threading library. and pymysql is pure python implementation. at socket io to mysql, the thread can switched.\n\nBased on what you told, the issue is to hit max connection of mysql.\nSo the real issue is to suppress the number of connections to mysql.\nFortunately sqlalchemy provides knobs to pool_size(default 5), max_overflow(default 20).\nand the right thing is to setup mysql max_connection based on requirement.\nI\u0027m guessing with this patch, you happened to use small number of db connection. In neutorn agent case, rpc worker usually may not use so many db connections.\n\nSo the direction isn\u0027t to blindly have only one journal thread, but to make it more flexibile/configurable.\nFor rpc server, db activity isn\u0027t so high based on what you said, single or small number of journal thread would be enought. On the other hand on rest api server, it helps to have many journal thread.","commit_id":"521fba29e91672e674df8e7f2e2f2f28274e42b8"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"9e7bdf4c804d1c8bff4ef5df732f7356626c9b0a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Make Journal thread class a singleton"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Due to [1] each Python process only runs a single instance of a journal"},{"line_number":10,"context_line":"thread simultaneously."},{"line_number":11,"context_line":"There\u0027s really no sense in more than one journal class running in a"},{"line_number":12,"context_line":"given process so changed the journal thread class to be a singleton."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The journal thread is already set to run either on an event fired after"},{"line_number":15,"context_line":"an entry has been created or on a set timer. It is also processing all"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"7f231b9d_18c4293f","line":12,"range":{"start_line":9,"start_character":0,"end_line":12,"end_character":68},"in_reply_to":"7f231b9d_03c4c3f3","updated":"2017-06-18 10:47:18.000000000","message":"I\u0027m not sure why it matters that socket I/O can be switched or not, there is no need to switch it as per process there\u0027s no need for more than one journal processing loop to run since each loop run would anyway loop over all the journal entries until the queu (table) is empty.\n\nI can see you might be concerned about I/O blocking when we send the call to ODL REST API itself, and this can be easily addressed in the follow up patch that introduces a thread pool. The thread pool can be used per single entry processing so that all I/O ocurring at that point is parallelized.\n\nI don\u0027t think logically there\u0027s a reason to have the journal initialized several times as that\u0027s not beneficial in any way other than I/O on a single request basis which can be addressed better by a thread pool as described above.","commit_id":"521fba29e91672e674df8e7f2e2f2f28274e42b8"}],"networking_odl/journal/journal.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"8f034bd7c8b29ec32b64b175d46a54bbaa3f1225","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self._max_retry_count \u003d cfg.CONF.ml2_odl.retry_count"},{"line_number":101,"context_line":"        self.event \u003d threading.Event()"},{"line_number":102,"context_line":"        self.lock \u003d threading.RLock()"},{"line_number":103,"context_line":"        self.odl_sync_thread \u003d threading.Thread("},{"line_number":104,"context_line":"            name\u003d\u0027sync\u0027,"},{"line_number":105,"context_line":"            target\u003dself.run_sync_thread)"},{"line_number":106,"context_line":"        self._thread_running \u003d False"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_e57fc914","line":104,"range":{"start_line":103,"start_character":0,"end_line":104,"end_character":24},"updated":"2017-03-22 02:30:16.000000000","message":"anyway after this patch, we can introduce threadpool here.\nLet\u0027s go ahead.","commit_id":"967f5393184dbb8eebad77fec281bc7eb3dd3f4e"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"5728047df3edc27245035d6830d0ecb0952339a7","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self._max_retry_count \u003d cfg.CONF.ml2_odl.retry_count"},{"line_number":101,"context_line":"        self.event \u003d threading.Event()"},{"line_number":102,"context_line":"        self.lock \u003d threading.RLock()"},{"line_number":103,"context_line":"        self.odl_sync_thread \u003d threading.Thread("},{"line_number":104,"context_line":"            name\u003d\u0027sync\u0027,"},{"line_number":105,"context_line":"            target\u003dself.run_sync_thread)"},{"line_number":106,"context_line":"        self._thread_running \u003d False"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_b5094f2d","line":104,"range":{"start_line":103,"start_character":0,"end_line":104,"end_character":24},"in_reply_to":"1a1ced50_e57fc914","updated":"2017-03-26 11:02:25.000000000","message":"Sure let\u0027s discuss what this means on the weekly IRC meeting.","commit_id":"967f5393184dbb8eebad77fec281bc7eb3dd3f4e"}],"networking_odl/tests/unit/base_v2.py":[{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"26295a9d9b1cc771142ed6206f6d98587afc1cf6","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from oslo_config import cfg"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from networking_odl.common import client"},{"line_number":22,"context_line":"from networking_odl.journal import journal"},{"line_number":23,"context_line":"from networking_odl.journal import maintenance"},{"line_number":24,"context_line":"from networking_odl.ml2 import mech_driver_v2"},{"line_number":25,"context_line":"from networking_odl.tests import base"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a1ff146_02bb89c5","line":22,"range":{"start_line":22,"start_character":0,"end_line":22,"end_character":42},"updated":"2017-03-15 06:21:36.000000000","message":"pep8 failure, journal is not being used.","commit_id":"22876d4af7894e4ed1d0122dc8505a9e860733db"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"3ae5349b6fd2f7919c2361ee743c72e7d2a7ac6e","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        cfg.CONF.set_override(\u0027mechanism_drivers\u0027,"},{"line_number":35,"context_line":"                              [\u0027logger\u0027, \u0027opendaylight_v2\u0027], \u0027ml2\u0027)"},{"line_number":36,"context_line":"        cfg.CONF.set_override(\u0027extension_drivers\u0027,"},{"line_number":37,"context_line":"                              [\u0027port_security\u0027, \u0027qos\u0027], \u0027ml2\u0027)"},{"line_number":38,"context_line":"        self.mock_mt_thread \u003d mock.patch.object("},{"line_number":39,"context_line":"            maintenance.MaintenanceThread, \u0027start\u0027).start()"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1a1ced50_edb634db","line":37,"updated":"2017-03-20 02:12:11.000000000","message":"As you are just mocking the journal object, I dont think the call in line#22 is needed.\n\nOr if you still need it, mock the thread then :)","commit_id":"22876d4af7894e4ed1d0122dc8505a9e860733db"}],"networking_odl/tests/unit/bgpvpn/test_odl_v2.py":[{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"3ae5349b6fd2f7919c2361ee743c72e7d2a7ac6e","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        super(OpendaylightBgpvpnDriverTestCase, self).setUp()"},{"line_number":32,"context_line":"        self.db_session \u003d neutron_db_api.get_reader_session()"},{"line_number":33,"context_line":"        self.driver \u003d driverv2.OpenDaylightBgpvpnDriver(service_plugin\u003dNone)"},{"line_number":34,"context_line":"        self.context \u003d self._get_mock_context()"},{"line_number":35,"context_line":"        self.thread \u003d journal.OpendaylightJournalThread()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def _get_mock_context(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a1ced50_0dbab0c0","line":34,"updated":"2017-03-20 02:12:11.000000000","message":"Do you need to start/mock the journal here?","commit_id":"22876d4af7894e4ed1d0122dc8505a9e860733db"}],"networking_odl/tests/unit/l3/test_l3_odl_v2.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"8f034bd7c8b29ec32b64b175d46a54bbaa3f1225","unresolved":false,"context_lines":[{"line_number":46,"context_line":"PORT_ID \u003d \u0027port_uuid\u0027"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"class OpenDayLightMechanismConfigTests(testlib_api.SqlTestCase):"},{"line_number":50,"context_line":"    def setUp(self):"},{"line_number":51,"context_line":"        super(OpenDayLightMechanismConfigTests, self).setUp()"},{"line_number":52,"context_line":"        mock.patch.object(maintenance.MaintenanceThread, \u0027start\u0027).start()"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a1ced50_25972149","side":"PARENT","line":49,"range":{"start_line":49,"start_character":0,"end_line":49,"end_character":64},"updated":"2017-03-22 02:30:16.000000000","message":"why is this testcases removed?","commit_id":"708160265b4625e248df2137c0e1eb10af3d8e93"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"5728047df3edc27245035d6830d0ecb0952339a7","unresolved":false,"context_lines":[{"line_number":46,"context_line":"PORT_ID \u003d \u0027port_uuid\u0027"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"class OpenDayLightMechanismConfigTests(testlib_api.SqlTestCase):"},{"line_number":50,"context_line":"    def setUp(self):"},{"line_number":51,"context_line":"        super(OpenDayLightMechanismConfigTests, self).setUp()"},{"line_number":52,"context_line":"        mock.patch.object(maintenance.MaintenanceThread, \u0027start\u0027).start()"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_f5ffd7fe","side":"PARENT","line":49,"range":{"start_line":49,"start_character":0,"end_line":49,"end_character":64},"in_reply_to":"1a1ced50_25972149","updated":"2017-03-26 11:02:25.000000000","message":"I explained in the commit message.\n\nGenerally this is already tested by networking_odl.tests.unit.common.test_client.ClientTestCase so there\u0027s no need to do the same checks again elsewhere.\n\nAlso when moving to singleton this breaks the tests randomly because it created a client with bad config so other tests get it too because the thread is the same thread with the same client with the bad config which is used in these tests.\nAlso these tests fail since they can get a good client config  which then causes the tests to fail because the JournalThread ctor doesn\u0027t throw and exception due to the bad config (which isn\u0027t used)","commit_id":"708160265b4625e248df2137c0e1eb10af3d8e93"}],"networking_odl/tests/unit/ml2/test_mechanism_odl_v2.py":[{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"2568d8d1e4e0f9b200f35d966ab360391c77567c","unresolved":false,"context_lines":[{"line_number":561,"context_line":"    def test_cleanup_processing_rows_time_expired(self):"},{"line_number":562,"context_line":"        old_time \u003d datetime.datetime.utcnow() - datetime.timedelta(hours\u003d24)"},{"line_number":563,"context_line":"        self._test_cleanup_processing_rows(old_time, odl_const.PENDING)"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"    def test_thread_call(self):"},{"line_number":566,"context_line":"        \"\"\"Verify that the sync thread method is called.\"\"\""},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        # Create any object that would spin up the sync thread via the"},{"line_number":569,"context_line":"        # decorator call_thread_on_end() used by all the event handlers."},{"line_number":570,"context_line":"        self._call_operation_object(odl_const.ODL_CREATE,"},{"line_number":571,"context_line":"                                    odl_const.ODL_NETWORK)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"        # Verify that the thread call was made."},{"line_number":574,"context_line":"        self.assertTrue(self.mock_sync_thread.called)"},{"line_number":575,"context_line":""},{"line_number":576,"context_line":"    def test_sg(self):"},{"line_number":577,"context_line":"        self._test_object_type(odl_const.ODL_SG)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5ff73747_94a9e7e0","side":"PARENT","line":574,"range":{"start_line":564,"start_character":0,"end_line":574,"end_character":53},"updated":"2017-04-24 10:28:33.000000000","message":"Can you please describe, why this test case has been removed?","commit_id":"9c0129f1c82efcb0351d3cc601b48fe2c68b51ec"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"87bfe2aac7165e061b4f3a61dac7a1ede84ffd5f","unresolved":false,"context_lines":[{"line_number":561,"context_line":"    def test_cleanup_processing_rows_time_expired(self):"},{"line_number":562,"context_line":"        old_time \u003d datetime.datetime.utcnow() - datetime.timedelta(hours\u003d24)"},{"line_number":563,"context_line":"        self._test_cleanup_processing_rows(old_time, odl_const.PENDING)"},{"line_number":564,"context_line":""},{"line_number":565,"context_line":"    def test_thread_call(self):"},{"line_number":566,"context_line":"        \"\"\"Verify that the sync thread method is called.\"\"\""},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        # Create any object that would spin up the sync thread via the"},{"line_number":569,"context_line":"        # decorator call_thread_on_end() used by all the event handlers."},{"line_number":570,"context_line":"        self._call_operation_object(odl_const.ODL_CREATE,"},{"line_number":571,"context_line":"                                    odl_const.ODL_NETWORK)"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":"        # Verify that the thread call was made."},{"line_number":574,"context_line":"        self.assertTrue(self.mock_sync_thread.called)"},{"line_number":575,"context_line":""},{"line_number":576,"context_line":"    def test_sg(self):"},{"line_number":577,"context_line":"        self._test_object_type(odl_const.ODL_SG)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5ff73747_f4d26b34","side":"PARENT","line":574,"range":{"start_line":564,"start_character":0,"end_line":574,"end_character":53},"in_reply_to":"5ff73747_94a9e7e0","updated":"2017-04-24 10:39:03.000000000","message":"Now this thread is a singleton so it will be initialized only once, hence this method is called only once and not in the context of this test so the test fails.\n\nMaking the thread a singleton made this test unnecessary.","commit_id":"9c0129f1c82efcb0351d3cc601b48fe2c68b51ec"}],"networking_odl/tests/unit/qos/test_qos_driver_v2.py":[{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"26295a9d9b1cc771142ed6206f6d98587afc1cf6","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from networking_odl.common import constants as odl_const"},{"line_number":20,"context_line":"from networking_odl.db import db"},{"line_number":21,"context_line":"from networking_odl.journal import journal"},{"line_number":22,"context_line":"from networking_odl.qos import qos_driver_v2 as qos_driver"},{"line_number":23,"context_line":"from networking_odl.tests.unit import base_v2"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a1ff146_a2c47540","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":42},"updated":"2017-03-15 06:21:36.000000000","message":"pep8 failure journal is not being used.","commit_id":"22876d4af7894e4ed1d0122dc8505a9e860733db"}]}
