On 25-01-2023 16:49, Tomasz Dubiel wrote:
> As I said, Im not sure whether this was exactly the same in FB 2.5 or no.
> The current situation is that gbak completes successfully, but with the
> message:
> "gbak: cannot commit index ...
> gbak ERROR violation of foreign key constaint
> gbak ERROR: foreign key reference target does not exist
> .....
> gbak: Database is not online due to failure to activate one or more indices
> gbak: Run gfix -online to bring database online without active indices"
> This is the result of running FBBackupManager.restoreDatabase(); there
> is no exception and without manually searching for the logger messages,
> I have no idea something went wrong. Do you think this is a bug?
I'm not sure. I suggest you ask on firebird-devel if the service API
actually provides a way to detect this (other than by scanning the
service response).
If you think with Firebird 2.5 Jaybird used to produce an actual
exception, I guess the mechanism should be there, and if that no longer
works, I think it is a bug in Firebird, but that is an assumption based
on you mentioning that you recall it worked differently with Firebird 2.5.
I rarely touch the management classes (and almost all of them predate me
joining Jaybird), so I'm not really that familiar with the ins-and-outs
of these APIs. I'll see if I can reproduce a similar problem and
experiment with this, but that might take a few days before I have time
to do so (and intentionally creating broken backups is not always so easy).
Mark
--
Mark Rotteveel