Error 2281: Unable to Update Write Ignore Rules

Overview

Write Ignore is a feature by which a user can instruct ScaleArc not to treat specified queries as Write queries. You may encounter the following error message while trying to enable or disable Write Ignore Rules:

ERROR: 2281
Failed to update write ignore rule. 501501.

writeignore.png

 

Solution

This happens when the configuration database is changed and the updated status is not propagated to the core cluster. The configuration is a representation of what is running in the core cluster process, and any changes are propagated to the core cluster processes via internal commands, so this situation can result due to any of the internal commands failing.

This can be resolved by performing any of the following actions to force a sync between the configuration database and the core cluster:

  • Perform an HA failover to the Secondary and back. This will cause the cluster processes to be restarted with minimal downtime, and this will read the configuration you currently have in the SQLite configuration database.
  • Or, Stop and start the cluster. If there is no live traffic restarting the cluster this way will cause the same effect which will resolve the issue.

If neither of the above steps resolves the issue, the linked article under "Click Here for more information" on the error dialog recommends using the "RESET Configuration Lock" button by going to Settings > System Settings and locating the System Config tab. This action will reset any unreleased locks on the cluster configuration database.

This problem is also known to occur if there are duplicate entries for Stored Procedures in the cluster configuration database. Follow these steps to identify duplicate entries and delete all duplicates with disabled status.

Important: Ensure you take a backup of the SQLite databases in /system directory before doing any changes to the configuration databases in case a rollback is needed.

Follow these steps to resolve the issue:

  1. From the cluster control panel on the ScaleArc UI, identify the cluster-ID of the affected cluster, where Write Ignore rules cannot be modified
  2. Log into ScaleArc instance command-line via SSH
  3. Open the corresponding cluster configuration DB with sqlite3 /system/lb_<cluster_id>.sqlite
  4. Run the following commands for better command line visualization:
    .mod column 
    .headers on
  5. Check the lb_writeignore table for duplicate entries by executing:
    select * from lb_writeignore where dbuserid = 0;
  6. Delete the duplicate entries having status 0 (disabled) by executing:
    delete from lb_writeignore where id = <id>; ​:
    Write_ignore_rules_UI_fix.png
  7. Validate in the UI that the Write Ignore Rules for these stored procedures can now be enabled and disabled without issues.
  8. Exit SQLite with .quit command.
  9. Exit the SSH session with exit.

Comments

0 comments

Please sign in to leave a comment.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request