Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/16661 )
Change subject: KUDU-1563. Add UPDATE_IGNORE and DELETE_IGNORE operations ...................................................................... Patch Set 6: (1 comment) http://gerrit.cloudera.org:8080/#/c/16661/4/src/kudu/tablet/ops/write_op.cc File src/kudu/tablet/ops/write_op.cc: http://gerrit.cloudera.org:8080/#/c/16661/4/src/kudu/tablet/ops/write_op.cc@105 PS4, Line 105: case RowOperationsPB::INSERT: : case RowOperationsPB::INSERT_IGNORE: : InsertIfNotPresent(privileges, WritePrivilegeType::INSERT); : break; : case RowOperationsPB::UPSERT: : InsertIfNotPresent(privileges, WritePrivilegeType::INSERT); : InsertIfNotPresent(privileges, WritePrivilegeType::UPDATE); : break; : case RowOperationsPB::UPDATE: : case RowOperationsPB::UPDATE_IGNORE: : InsertIfNotPresent(privileges, WritePrivilegeType::UPDATE); : break; : case Row > We briefly chatted about this -- this means that INSERT_IGNORE ops currentl To validate this, I applied the following diff: diff --git a/src/kudu/tserver/tablet_server_authorization-test.cc b/src/kudu/tserver/tablet_server_authorization-test.cc index ced797b84..881215361 100644 --- a/src/kudu/tserver/tablet_server_authorization-test.cc +++ b/src/kudu/tserver/tablet_server_authorization-test.cc @@ -1220,7 +1220,7 @@ class WritePrivilegeAuthzTest : public AuthzTabletServerTestBase { TEST_F(WritePrivilegeAuthzTest, TestSingleWriteOperations) { { vector<WriteOpDescriptor> batch({ - { RowOperationsPB::INSERT, /*key=*/0, /*val=*/0 } + { RowOperationsPB::INSERT_IGNORE, /*key=*/0, /*val=*/0 } }); NO_FATALS(CheckWritePrivileges(batch, WritePrivileges{ WritePrivilegeType::INSERT })); } This tried removing the INSERT privilege and expected the op to fail, but it didn't: ../../src/kudu/tserver/tablet_server_authorization-test.cc:1175: Failure Value of: s.IsRemoteError() Actual: false Expected: true OK Google Test trace: ../../src/kudu/tserver/tablet_server_authorization-test.cc:1174: Privileges: { UPDATE, DELETE } ../../src/kudu/tserver/tablet_server_authorization-test.cc:1169: Write request: { INSERT_IGNORE (0, 0) } ../../src/kudu/tserver/tablet_server_authorization-test.cc:1225: Failure Expected: CheckWritePrivileges(batch, WritePrivileges{ WritePrivilegeType::INSERT }) doesn't generate new fatal failures in the current thread. Actual: it does. -- To view, visit http://gerrit.cloudera.org:8080/16661 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I11dfd06e8d4d22cf1097fe1ff01a1b97cafaf899 Gerrit-Change-Number: 16661 Gerrit-PatchSet: 6 Gerrit-Owner: Grant Henke <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Attila Bukor <[email protected]> Gerrit-Reviewer: Bankim Bhavsar <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Mahesh Reddy <[email protected]> Gerrit-Reviewer: Tidy Bot (241) Gerrit-Comment-Date: Tue, 27 Oct 2020 23:12:51 +0000 Gerrit-HasComments: Yes
