)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"00f120570b935c8a230a98871a84fd4ee19a1179","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"b73ee348_e1d30f03","updated":"2023-05-22 11:41:24.000000000","message":"this is a great patch, but we need a test to catch this changes.","commit_id":"add8a69981fd86c17bb4e4e3b20872369901b73f"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"bb2e213b20004d9feaf8bf24f7c553ab5847104b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"d11f154f_589442b9","in_reply_to":"b73ee348_e1d30f03","updated":"2023-05-29 17:47:01.000000000","message":"Hi Wu! Thank you very much for the review. I added a new section to tox.ini to execute the unittests of the backup classes.\n\n```\n% tox -e backup\n```","commit_id":"add8a69981fd86c17bb4e4e3b20872369901b73f"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"0115c904e7241c4fc5379ecd1db7e271e65ead0f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"507fdcbc_a6a2e18d","updated":"2023-05-30 01:31:38.000000000","message":"hi, CI tests were not added here, they should add to trove-tempest-plguin project, I would add to that project, please undo the latest change. thanks.","commit_id":"0b8949f75f449ed7d02c71c3d2034b96e6d42736"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"0afcafd2b56c78ada55747f07e151fcc646d76b2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"65114901_c15a5e84","in_reply_to":"3d303b05_f4e0210e","updated":"2023-05-30 09:50:01.000000000","message":"that\u0027s would be great. yes, all CI tests should add to that project. as we already have the backup tests, but it doesn\u0027t work for some reason. we just need to fix it.","commit_id":"0b8949f75f449ed7d02c71c3d2034b96e6d42736"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"ae1ef0a66d505f77a66e032b6e5a61573639eb43","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":12,"id":"3d303b05_f4e0210e","in_reply_to":"507fdcbc_a6a2e18d","updated":"2023-05-30 03:07:44.000000000","message":"Hi Wu, I appreciate your comment! I reverted the last change because I found that new functional tests should be called using trove-tempest-plguin, which is not familiar with me.(^^;; ... but I will learn about it this time. :)","commit_id":"0b8949f75f449ed7d02c71c3d2034b96e6d42736"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"94e3d4a67667464cf87e0b08e6a5dee46b2b2c42","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"7a5444a4_f4c51520","updated":"2023-06-14 02:43:35.000000000","message":"recheck， our CI already support backup checks.","commit_id":"e993f0f505ad4bb97670236cf3fefb76bc078d75"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"ba0350a39d626e239633ff9f8cca3b93e6dff7d3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"ad764a24_bee33a20","updated":"2023-06-30 01:30:47.000000000","message":"well，the current CI tests don\u0027t cover these changes. i will fix the CI soon.","commit_id":"424866a972ae43cc33061d0578a8dd9321500bf8"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"8875e6e1485284e8cdc07b8c0c41b1ff48029f60","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"6779b9b3_fcfda648","updated":"2023-07-27 07:41:41.000000000","message":"the test passed， i will review soon.","commit_id":"beb7925b9e6c1dfa071b3bca3c8fe93ee9a538bf"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"a4dcda7ab7115d2074a8dfd68d0ae9e669857cb8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":17,"id":"68e5b8ec_4fc0248e","updated":"2023-09-13 06:23:24.000000000","message":"Hi, hirotaka, should we merged this together with https://review.opendev.org/c/openstack/trove/+/861781?","commit_id":"4bd4e3134fbcd9769ab88881ad01a0fce0189772"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"b248e2bc2e9c228139249fe213f72988b8009f7a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"97174ee5_5cfa0716","updated":"2023-11-09 01:45:02.000000000","message":"Hello, Wu and Bo. This patch works fine in my environment. This patch is for postgresql driver. I will create a similar patch for mysql driver and mariadb one.\n\nHere is a short memo for my test.\n\n## Create an instance\n\n```\nDATABASE_VERSION\u003d12.16\nopenstack datastore version create ${DATABASE_VERSION} postgresql postgresql \"\" --image-tags trove,postgresql --active --default --version-number ${DATABASE_VERSION}\n```\n```\nDATABASE_VERSION\u003d12.16\nopenstack database instance create postgresql1 --flavor d2     --nic net-id\u003d$(openstack network list -f value -c ID --name private)     --datastore postgresql --datastore-version ${DATABASE_VERSION} --datastore-version-number ${DATABASE_VERSION} --size 1\n```\n\n\n## Create a Full Backup\n\nFirstly, make test data for PostgreSQL.\n\n```\nssh -o StrictHostKeyChecking\u003daccept-new ubuntu@$(openstack database instance show postgresql1 -f value -c ip)\n```\n```\ndocker exec -e PGPASSWORD\u003d$(sudo grep password /var/lib/postgresql/conf.d/postgres.cnf | awk \u0027{print $3}\u0027) -ti database /bin/bash\n```\n```\ncat \u003e /tmp/init_test_postgresql.sql \u003c\u003cEOF\nDROP TABLE IF EXISTS test.contacts;\nDROP TABLE IF EXISTS test.accounts;\nDROP SCHEMA IF EXISTS test;\nDROP USER IF EXISTS db_user;\n\nCREATE SCHEMA test;\nCREATE TABLE test.contacts (\n   id SERIAL PRIMARY KEY,\n   first_name VARCHAR(25),\n   last_name VARCHAR(25),\n   email VARCHAR(100)\n);\n\nCREATE TABLE test.accounts (\n   id SERIAL PRIMARY KEY,\n   first_name VARCHAR(25),\n   last_name VARCHAR(25),\n   email VARCHAR(100),\n   amount DECIMAL(15,2) CHECK (amount \u003e\u003d 0.0),\n   UNIQUE (email)\n);\n\nCREATE USER db_user\n   PASSWORD \u0027db_user_password\u0027;\n\nGRANT SELECT, INSERT, UPDATE, DELETE, DELETE\n   ON test.contacts\n   TO db_user;\n\nGRANT SELECT, INSERT, UPDATE, DELETE, DELETE\n   ON test.accounts\n   TO db_user;\n\nINSERT INTO test.contacts(\n        first_name, last_name, email\n) VALUES (\n        \u0027fn1\u0027, \u0027ln1\u0027, \u0027fn1ln1@example.com\u0027\n);\nSELECT first_name, last_name, email FROM test.contacts;\n\nEOF\n```\n\n```\nPGPASSWORD\u003d${PGPASSWORD} psql -U postgres -h 127.0.0.1 \u003c /tmp/init_test_postgresql.sql\n```\n```\nexit\n```\n```\nexit\n```\n\nThen, create a Full Backup.\n```\nINSTANCE_NAME\u003dpostgresql1\nBACKUP_NAME\u003dpostgresql1_backup1\nopenstack database backup create --instance ${INSTANCE_NAME} --swift-container \u0027test\u0027 ${BACKUP_NAME}\nopenstack database backup list\n```\n\n## Create an Incremental Backup\n\nFirstly make incremental data for PostgreSQL.\n\n```\nssh -o StrictHostKeyChecking\u003daccept-new ubuntu@$(openstack database instance show postgresql1 -f value -c ip)\n```\n\n```\ndocker exec -e MY_PGPASSWORD\u003d$(sudo grep password /var/lib/postgresql/conf.d/postgres.cnf | awk \u0027{print $3}\u0027) -ti database /bin/bash\n```\n\n```\ncat \u003e /tmp/init_test_postgresql.sql \u003c\u003cEOF\nINSERT INTO test.contacts(\n    first_name, last_name, email\n) VALUES (\n    \u0027fn2\u0027, \u0027ln2\u0027, \u0027fn2ln2@example.com\u0027\n);\nSELECT first_name, last_name, email FROM test.contacts;\nEOF\n```\n\n```\nPGPASSWORD\u003d${PGPASSWORD} psql -U postgres -h 127.0.0.1 \u003c /tmp/init_test_postgresql.sql\n```\n\n```\nexit\n```\n\n```\nexit\n```\n\nThen, create an incremental backup data.\n\n```\nINSTANCE_NAME\u003dpostgresql1\nBACKUP_NAME\u003dpostgresql1_backup1\nINC_BACKUP_NAME\u003dpostgresql1_backup1_inc\nopenstack database backup create --instance ${INSTANCE_NAME} \\\n    --swift-container \u0027test\u0027 ${INC_BACKUP_NAME} \\\n    --parent $(openstack database backup show ${BACKUP_NAME} -f value -c id)\nopenstack database backup list\n```\n\nThen, check the backup data.\n```\nfor file in $(swift list test); do swift download test $file; gunzip $file ; echo $file; tar tvf $(echo $file|sed -e \u0027s|.gz||g\u0027) ;done\n```\n\n## Create an instance using the full backup\n\n```\nDATABASE_VERSION\u003d12.16\nINSTANCE_NAME\u003dpostgresql1\nNEW_INSTANCE_NAME\u003dnew_${INSTANCE_NAME}\nBACKUP_NAME\u003dpostgresql1_backup1\nINC_BACKUP_NAME\u003d${BACKUP_NAME}_inc\nopenstack database instance create ${NEW_INSTANCE_NAME} --flavor d2 \\\n    --nic net-id\u003d$(openstack network list -f value -c ID --name private) \\\n    --datastore postgresql --datastore-version ${DATABASE_VERSION} --datastore-version-number ${DATABASE_VERSION} --size 1 \\\n    --backup $(openstack database backup show ${BACKUP_NAME} -f value -c id)\n```\n\n\nThen, check if data is restored\n\n```\nssh -o StrictHostKeyChecking\u003daccept-new ubuntu@$(openstack database instance show new_postgresql1 -f value -c ip)\n```\n```\ndocker exec -e PGPASSWORD\u003d$(sudo grep password /var/lib/postgresql/conf.d/postgres.cnf | awk \u0027{print $3}\u0027) -ti database /bin/bash\n```\n```\necho \"SELECT first_name, last_name, email FROM test.contacts;\" \u003e /tmp/1.sql\nPGPASSWORD\u003d${PGPASSWORD} psql -U postgres -h 127.0.0.1 \u003c /tmp/1.sql\n```\n```\nexit\n```\n\n```\nexit\n```\n\nThen, delete the instance(because of my poor development environment!).\n```\nopenstack database instance delete ${NEW_INSTANCE_NAME}\n```\n\n## Create an instance using the incremental backup\n\n```\nDATABASE_VERSION\u003d12.16\nINSTANCE_NAME\u003dpostgresql1\nNEW_INSTANCE_NAME\u003dnew_${INSTANCE_NAME}_inc\nBACKUP_NAME\u003dpostgresql1_backup1\nINC_BACKUP_NAME\u003d${BACKUP_NAME}_inc\nopenstack database instance create ${NEW_INSTANCE_NAME} --flavor d2 \\\n    --nic net-id\u003d$(openstack network list -f value -c ID --name private) \\\n    --datastore postgresql --datastore-version ${DATABASE_VERSION} \\\n    --datastore-version-number ${DATABASE_VERSION} --size 1 \\\n    --backup $(openstack database backup show ${INC_BACKUP_NAME} -f value -c id)\n```\n\nThen, check if data is restored.\n```\nssh -o StrictHostKeyChecking\u003daccept-new ubuntu@$(openstack database instance show ${NEW_INSTANCE_NAME} -f value -c ip)\n```\n```\ndocker exec -e MY_PGPASSWORD\u003d$(sudo grep password /var/lib/postgresql/conf.d/postgres.cnf | awk \u0027{print $3}\u0027) -ti database /bin/bash\n```\n```\ncat \u003e /tmp/init_test_postgresql.sql \u003c\u003cEOF\nSELECT first_name, last_name, email FROM test.contacts;\nEOF\n```\n\n```\nPGPASSWORD\u003d${PGPASSWORD} psql -U postgres -h 127.0.0.1 \u003c /tmp/init_test_postgresql.sql\n```","commit_id":"ebb2647fdd6ff4cdea6dc565e824d0d27ee5d828"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"b648d759d668bc83fe5134ea6bb05b9ef8abfaca","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"433a35ea_c97660a8","updated":"2023-10-25 14:31:01.000000000","message":"Hi, hirotaka, I am going to review this part recently, with the #2010{566,558} fixed, I want to know whether we still need this? or we just need this one https://review.opendev.org/c/openstack/trove/+/861781 ?","commit_id":"ebb2647fdd6ff4cdea6dc565e824d0d27ee5d828"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"9aaa2232a97dc17ad031733945ad2ff9e95da29c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"dc023ea8_92e300ab","updated":"2023-12-27 07:01:29.000000000","message":"I think we don\u0027t need this patch any more?","commit_id":"ebb2647fdd6ff4cdea6dc565e824d0d27ee5d828"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"386b5ed4c39da2a260d6b71580863306add51ea1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"84b56f4d_c54354ed","updated":"2023-09-23 13:22:56.000000000","message":"Thanks for the comment! I have updated the comments.","commit_id":"ebb2647fdd6ff4cdea6dc565e824d0d27ee5d828"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"6edd584196f9e9ae5b94035e65b6192e101b3c18","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"4d0b5e6d_65598949","in_reply_to":"433a35ea_c97660a8","updated":"2023-10-27 01:06:20.000000000","message":"Hello Wu, Thanks for the comment! I see. We should maintain https://review.opendev.org/c/openstack/trove/+/861781, so I will abandon this ticket and merge this patches to #861781.","commit_id":"ebb2647fdd6ff4cdea6dc565e824d0d27ee5d828"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"5261aa18de5ae34810b39165f0c24a51b2166741","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"58abad52_9551287a","in_reply_to":"4d0b5e6d_65598949","updated":"2023-11-01 03:38:45.000000000","message":"hello， Hirotaka， thanks for your great work.","commit_id":"ebb2647fdd6ff4cdea6dc565e824d0d27ee5d828"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"c5d46c427452833afa0ae0377b05fab53d277e9c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"7cfd892c_be194fee","in_reply_to":"97174ee5_5cfa0716","updated":"2023-11-09 02:53:43.000000000","message":"yes, this patch is fine, because it passed our postgresql CI which tests the full backup and incremental backup. keep this patch here, I am review the other patch. thanks","commit_id":"ebb2647fdd6ff4cdea6dc565e824d0d27ee5d828"}],"backup/drivers/postgres.py":[{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"a4dcda7ab7115d2074a8dfd68d0ae9e669857cb8","unresolved":true,"context_lines":[{"line_number":199,"context_line":"    def __exit__(self, exc_type, exc_value, traceback):"},{"line_number":200,"context_line":"        \"\"\"Clean up everything.\"\"\""},{"line_number":201,"context_line":"        # TODO(hiwkby) Temporarily overrided by the subclass because other"},{"line_number":202,"context_line":"        # backup drivers doesn\u0027t work correctly due to #2010{467,345,566,558}."},{"line_number":203,"context_line":"        if getattr(self, \u0027process\u0027, None):"},{"line_number":204,"context_line":"            try:"},{"line_number":205,"context_line":"                # Send a sigterm to the session leader, so that all"}],"source_content_type":"text/x-python","patch_set":17,"id":"6815ea8d_f95e89b7","line":202,"range":{"start_line":202,"start_character":55,"end_line":202,"end_character":78},"updated":"2023-09-13 06:23:24.000000000","message":"these issue seems to be fixed now.","commit_id":"4bd4e3134fbcd9769ab88881ad01a0fce0189772"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"fb17daaa572658875d4c3e63f59ec8bad628a92f","unresolved":false,"context_lines":[{"line_number":199,"context_line":"    def __exit__(self, exc_type, exc_value, traceback):"},{"line_number":200,"context_line":"        \"\"\"Clean up everything.\"\"\""},{"line_number":201,"context_line":"        # TODO(hiwkby) Temporarily overrided by the subclass because other"},{"line_number":202,"context_line":"        # backup drivers doesn\u0027t work correctly due to #2010{467,345,566,558}."},{"line_number":203,"context_line":"        if getattr(self, \u0027process\u0027, None):"},{"line_number":204,"context_line":"            try:"},{"line_number":205,"context_line":"                # Send a sigterm to the session leader, so that all"}],"source_content_type":"text/x-python","patch_set":17,"id":"fe18c427_52fa4454","line":202,"range":{"start_line":202,"start_character":55,"end_line":202,"end_character":78},"in_reply_to":"6815ea8d_f95e89b7","updated":"2023-09-23 13:22:04.000000000","message":"Done","commit_id":"4bd4e3134fbcd9769ab88881ad01a0fce0189772"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"f279881e96d5a5adb85d100d96d6da9779965b07","unresolved":true,"context_lines":[{"line_number":191,"context_line":"    def __enter__(self):"},{"line_number":192,"context_line":"        \"\"\"Start up the process.\"\"\""},{"line_number":193,"context_line":"        # TODO(hiwkby) Temporarily overrided by the subclass because other"},{"line_number":194,"context_line":"        # backup drivers doesn\u0027t work correctly due to #2010{566,558}."},{"line_number":195,"context_line":"        self.pre_backup()"},{"line_number":196,"context_line":"        self._run()"},{"line_number":197,"context_line":"        return self"}],"source_content_type":"text/x-python","patch_set":18,"id":"3976ad67_a99183d4","line":194,"range":{"start_line":194,"start_character":55,"end_line":194,"end_character":69},"updated":"2023-10-07 08:22:21.000000000","message":"Hi, I am not sure that whether we need to fix #2010{566, 558} first? so that we don\u0027t need to override this subclass ?","commit_id":"ebb2647fdd6ff4cdea6dc565e824d0d27ee5d828"},{"author":{"_account_id":26285,"name":"wu.chunyang","email":"wchy1001@gmail.com","username":"wu.chunyang"},"change_message_id":"c5d46c427452833afa0ae0377b05fab53d277e9c","unresolved":true,"context_lines":[{"line_number":191,"context_line":"    def __enter__(self):"},{"line_number":192,"context_line":"        \"\"\"Start up the process.\"\"\""},{"line_number":193,"context_line":"        # TODO(hiwkby) Temporarily overrided by the subclass because other"},{"line_number":194,"context_line":"        # backup drivers doesn\u0027t work correctly due to #2010{566,558}."},{"line_number":195,"context_line":"        self.pre_backup()"},{"line_number":196,"context_line":"        self._run()"},{"line_number":197,"context_line":"        return self"}],"source_content_type":"text/x-python","patch_set":18,"id":"5b74a88c_a1e21af4","line":194,"range":{"start_line":194,"start_character":55,"end_line":194,"end_character":69},"in_reply_to":"3976ad67_a99183d4","updated":"2023-11-09 02:53:43.000000000","message":"Now, these bugs were fixed, Do we still need to override __enter__ and __exit__ function here ？","commit_id":"ebb2647fdd6ff4cdea6dc565e824d0d27ee5d828"},{"author":{"_account_id":31737,"name":"Hirotaka Wakabayashi","email":"hiwkby@yahoo.com","username":"hiwkby"},"change_message_id":"78115d7e116e328c372a5286dfd652d856f78ba2","unresolved":true,"context_lines":[{"line_number":191,"context_line":"    def __enter__(self):"},{"line_number":192,"context_line":"        \"\"\"Start up the process.\"\"\""},{"line_number":193,"context_line":"        # TODO(hiwkby) Temporarily overrided by the subclass because other"},{"line_number":194,"context_line":"        # backup drivers doesn\u0027t work correctly due to #2010{566,558}."},{"line_number":195,"context_line":"        self.pre_backup()"},{"line_number":196,"context_line":"        self._run()"},{"line_number":197,"context_line":"        return self"}],"source_content_type":"text/x-python","patch_set":18,"id":"7a4220d6_543f3e29","line":194,"range":{"start_line":194,"start_character":55,"end_line":194,"end_character":69},"in_reply_to":"5b74a88c_a1e21af4","updated":"2023-11-09 16:17:52.000000000","message":"Hello Wu! Thanks for the comment. Yes, I will remove these function from derived classes because these bugs were fixed.:) I am updating the patch today.:)","commit_id":"ebb2647fdd6ff4cdea6dc565e824d0d27ee5d828"}]}
