-
-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FR] Database restore must make every effort on activating deferred indexes #7269
Comments
I've made a confirmation test. Backup rest_bad.fbk is attached. This backup was made after turning rdb$index_active to "3" and adding/deleting rows. Currently on restore (2.5, 3.0, 4.0 was not tested) we have stop after FIRST problem with index None indices after that are not activated, they still stay in "inactive" state (value 3 in rdb$index_inactive). If we could have continuation of activating indices, there would be only 3 indices inactive - A1 PK, A3 PK, B2 FK. Note that this kind of a problem can be fixed only by repetitive actions (b/r, or restore -i and activating indices one by one), which can take very LONG time on big databases. |
If implemented, it should not be as a default action, but some kind of switch. |
What kind of incompatibility (or any side effect) you expect, if this will be default action? The initial issue does not expect the error to disappear. Current behavior forces admin to do more work on restored DB - to manually activate indices that were not activated by restore. Who ever will expect that "lot of indices inactive" is better than "as much as possible indices are activated"? |
well, you won, I changed my mind, let it be "some kind of switch". |
The restore code already tries to activate (build) as much indices as possible. I.e. there is no question if "this" should be default action or not - it is default action already. |
But the restore itself at the end will fail or will be succesfull? For me it should fail. But if this is the default action already i will see needs for swith to turn it off. |
In such case restore leave database in shutdown state, report:
and exit with code 2 |
Exit code is ok then. But i see that switch to stop restore immidietly will be also helpfull to do not spend time if someone do not need this. |
Is it indicated in status vector for services API as well or one have to parse text output? |
AFAIU, exit code of service routine never reported back to the service user. |
It's prety easy to make all non-zero exit codes be reported as errors in
services. If really needed.
|
Without it services seem to be pretty useless.
|
On 8/24/22 14:31, Dimitry Sibiryakov wrote:
Without it services seem to be pretty useless.
I think this to be suggested in devel and if nobody sees problems - feel
free to add a ticket, I will implement it.
Notice - in status vector it will be a notice that service thread failed
with exit code NNN, original message with a reason for is unknown at the
final point.
|
Please tell me how to make such a test database? How to “break” it? You cannot directly deactivate a primary key. |
Fixed database recovery aborting on the first failure of the first problematic deferred index gbak (FirebirdSQL#7269)
Reopen for backporting |
* fixed restore deferred primary key indexes Fixed database recovery aborting on the first failure of the first problematic deferred index gbak (#7269) * Extract function activateIndex Extracted "activateIndex" function to remove duplicate code when restoring the database
Database restore are aborted on first error of first problematic deferred index.
Database restore must make every effort on activating deferred indexes - build them all and show full problem list for each (#7268)
The text was updated successfully, but these errors were encountered: