xdenser / node-firebird-libfbclient

Firebird SQL binding
MIT License
82 stars 34 forks source link

infinity wait in deadlock #101

Open Den2016 opened 4 years ago

Den2016 commented 4 years ago

when third-party program lock some table and i try to commit my updates on this table - i dont get error, commitSync just infinity wait, until table is unlock

how get an error, if table, or record locks?

if i update locked record in IBExpert, i get deadlock error immediately, without any waits

xdenser commented 4 years ago

this depends on transaction lock resolution parameter it may be 'wait' and 'no_wait' but this library does set this parameter explicitly so default is used, default is 'wait'

Den2016 commented 4 years ago

how to set 'no_wait'?

i try this

        let conn = this.con.startNewTransactionSync()
        try {
            let res = conn.prepareSync("SET TRANSACTION NO WAIT");
            res = res.execSync();

but get error

In FBStatement::execSync - invalid transaction handle (expecting explicit transaction start)

i try querySync instead prepare/exec - same result

In querySync - invalid transaction handle (expecting explicit transaction start)
xdenser commented 4 years ago

currently library does not support setting this parameter

Den2016 commented 4 years ago

can i hope that someday it will be?

Den2016 commented 4 years ago

Ден, а ты по русски говоришь?