codenotary / immudb4net

Apache License 2.0
3 stars 3 forks source link

Unable to reconnect to db after incorrect UPSERT #40

Open Aduciicba opened 1 year ago

Aduciicba commented 1 year ago

After incorrect upsert operation (incorrect syntax, no value for PK in query) SDK seems to be unable to establish the connection with immu db after application restart. It fails with exception:

ImmuDB.Exceptions.VerificationException: 'Data is corrupted (dual proof verification failed for the local state).'

Immuclient shows no error and has no troubles to connect to that db and successfully operate with its data though.

Environment: Windows 10, Visual Studio 2019 Console Project on .NET 5 ImmuDB4Net 1.0.5 ImmuDB Server, Client and Admin 1.5.0 image

Aduciicba commented 1 year ago

The same after correct operation. Inserted two rows, restart the app and got VerificationException on Open. At the same time I'm able to reconnect and select those inserted rows with immuclient. Am I doing something wrong with closing session/conection?

That's what I'm calling before closing the app:

await client.Close();
await ImmuClient.ReleaseSdkResources();