List of steps to reproduce (step by step, including full links if applicable):
- Use Special:ApiSandbox to set any option to the default value (Special:ApiSandbox#action=options&format=json&change=watchdefault%3D1)
- Have a look at the logs, there is a delete statement for the user_properties table and the default option.
- Rerun the api
- There is still a delete, but there is never a row for this delete, it was deleted in the first step
What happens?:
If an app triggered many requests to the api's action=options to set options to the default value, it trigger delete statement and give pressure for the database, see T301433#7699716 for the problem/analyze
What should have happened instead?:
No delete is needed, there is no such a row
This would avoid the database (write) interaction for that unneeded web requests
Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.: master