kong icon indicating copy to clipboard operation
kong copied to clipboard

fix(db) skip delete hooks if no rows were affected

Open sumimakito opened this issue 2 years ago • 1 comments

Summary

This PR fixes the issue that DAO delete hooks were triggered when no rows were affected.

The issue currently affects Kong Enterprise and Kong Manager. When concurrent delete requests are initiated on the same entity, the counter in the workspace meta will potentially be decremented multiple times and become a negative number.

FT-3072

sumimakito avatar Jun 24 '22 03:06 sumimakito

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 24 '22 03:06 CLAassistant

I think this test can be written as a DAO unit test. We shouldn't have to use Test-Nginx and introduce a new test mode for it. PM'ed @SumiMakito offline to help get this merged into 3.0 before code freeze.

dndx avatar Aug 24 '22 01:08 dndx

@dndx Thanks! I have applied these suggestions.

sumimakito avatar Aug 24 '22 09:08 sumimakito