If the tokens have been deleted using deletion web-service request, it would delete the data related to the specific token from encryption_requests table but it would not free up the disk space.
Please find below the steps to reclaim the disk space for deleted data from encryption_requests table.
NOTE: This process would lock the encryption_requests table while performing the optimization. So, please pull the node being optimized out of the LoadBalancer to avoid any performance issues. |
shell> ls -lh /usr/local/strongauth/mariadb-<latest-version>/ibdata/strongkeylite/encryption_requests.*
shell> sudo service glassfishd stop
shell> nohup mysql -u skles -p`dbpass 2> /dev/null` strongkeylite -e "optimize table encryption_requests;" &
NOTE: This command will run in the background and would not time out even if the terminal gets disconnected. It took ~10 minutes to finish optimization after 60M tokens were deleted. |
shell> ps -efww | grep -i encryption
NOTE: After successful completion of process, the optimize table process should not show up in the command output and the nohup.out file should have the output similar to below. |
shell> ls -lh /usr/local/strongauth/mariadb-<latest-version>/ibdata/strongkeylite/encryption_requests.*
shell> sudo service glassfishd start