db:lock

Friday, 30 December 2022 · 8 messages · last reply 1 Jan 2023
ВВ
Ветошкин Владимир30 Dec 2022 08:19 #
Hello everyone I have an error "[db:lock] Database 'db' cannot be updated, it is opened by another process". While client's "reading" query from 'db' in progress, I query "db:alter('newdb','db')" for the same database. How can I wait for ending client's query and then "db:alter('newdb','db')"? Thanks for your help!
-- С уважением, Ветошкин Владимир Владимирович
DS
DK Singh30 Dec 2022 08:28 #
Hi, It seems that might be your DB is opened or your DB has Benn crashed Thanks
Quoted text · Ветошкин Владимир · 17 lines
On Fri, 30 Dec, 2022, 12:50 pm Ветошкин Владимир, <en-trance at yandex.ru> wrote: > Hello everyone > > I have an error "[db:lock] Database 'db' cannot be updated, it is opened > by another process". > While client's "reading" query from 'db' in progress, I query > "db:alter('newdb','db')" for the same database. > How can I wait for ending client's query and then "db:alter('newdb','db')"? > > Thanks for your help! > > -- > С уважением, > Ветошкин Владимир Владимирович > >
ВВ
Ветошкин Владимир30 Dec 2022 08:33 #
Hi, Yes, it's opened by client's query first. While that query is in progress, I query "db:alter" for the same database. How can I query "db:alter" after first query ends? Thank you
Quoted text · DK Singh · 20 lines
30.12.2022, 10:28, "DK Singh" <dharam.mahi at gmail.com>: > Hi,It seems that might be your DB is opened or your DB has Benn crashed > > Thanks > > On Fri, 30 Dec, 2022, 12:50 pm Ветошкин Владимир, <en-trance at yandex.ru> wrote: > > > Hello everyone > > > > I have an error "[db:lock] Database 'db' cannot be updated, it is opened by another process". > > While client's "reading" query from 'db' in progress, I query "db:alter('newdb','db')" for the same database. > > How can I wait for ending client's query and then "db:alter('newdb','db')"? > > > > Thanks for your help! > > > > > > -- > > С уважением, > > Ветошкин Владимир Владимирович > >
-- С уважением, Ветошкин Владимир Владимирович
DS
DK Singh30 Dec 2022 08:58 #
Hi If any update operation is going on by others query then you won't be able to read the DB Please see Basex transaction Management Thanks
Quoted text · Ветошкин Владимир · 42 lines
On Fri, 30 Dec, 2022, 1:03 pm Ветошкин Владимир, <en-trance at yandex.ru> wrote: > Hi, > > Yes, it's opened by client's query first. While that query is in progress, > I query "db:alter" for the same database. > How can I query "db:alter" after first query ends? > > Thank you > > 30.12.2022, 10:28, "DK Singh" <dharam.mahi at gmail.com>: > > Hi, > It seems that might be your DB is opened or your DB has Benn crashed > > Thanks > > On Fri, 30 Dec, 2022, 12:50 pm Ветошкин Владимир, <en-trance at yandex.ru> > wrote: > > Hello everyone > > I have an error "[db:lock] Database 'db' cannot be updated, it is opened > by another process". > While client's "reading" query from 'db' in progress, I query > "db:alter('newdb','db')" for the same database. > How can I wait for ending client's query and then "db:alter('newdb','db')"? > > Thanks for your help! > > -- > С уважением, > Ветошкин Владимир Владимирович > > > > > -- > С уважением, > Ветошкин Владимир Владимирович > >
ВВ
Ветошкин Владимир30 Dec 2022 09:08 #
Hi, Yes, I know. But reading operation began executing first and not ended when the second query (db:alter) begins.
Quoted text · DK Singh · 44 lines
30.12.2022, 10:58, "DK Singh" <dharam.mahi at gmail.com>: > Hi > If any update operation is going on by others query then you won't be able to read the DB > > Please see Basex transaction Management > > Thanks > > On Fri, 30 Dec, 2022, 1:03 pm Ветошкин Владимир, <en-trance at yandex.ru> wrote: > > > Hi, > > > > Yes, it's opened by client's query first. While that query is in progress, I query "db:alter" for the same database. > > How can I query "db:alter" after first query ends? > > > > Thank you > > > > 30.12.2022, 10:28, "DK Singh" <dharam.mahi at gmail.com>: > > > > > Hi,It seems that might be your DB is opened or your DB has Benn crashed > > > > > > Thanks > > > > > > On Fri, 30 Dec, 2022, 12:50 pm Ветошкин Владимир, <en-trance at yandex.ru> wrote: > > > > > > > Hello everyone > > > > > > > > I have an error "[db:lock] Database 'db' cannot be updated, it is opened by another process". > > > > While client's "reading" query from 'db' in progress, I query "db:alter('newdb','db')" for the same database. > > > > How can I wait for ending client's query and then "db:alter('newdb','db')"? > > > > > > > > Thanks for your help! > > > > > > > > > > > > -- > > > > С уважением, > > > > Ветошкин Владимир Владимирович > > > > > > > > > > -- > > С уважением, > > Ветошкин Владимир Владимирович > >
-- С уважением, Ветошкин Владимир Владимирович
ВВ
Ветошкин Владимир30 Dec 2022 09:30 #
I don't know why, but can't repeat it locally. First I query heavy reading operation on 'db', then I alter('dbcopy', 'db') and the second query waits ending the first. Why on the server the similar queries executed with errors, hmm.
Quoted text · Ветошкин Владимир · 56 lines
30.12.2022, 11:08, "Ветошкин Владимир" <en-trance at yandex.ru>: > Hi, > > Yes, I know. But reading operation began executing first and not ended when the second query (db:alter) begins. > > 30.12.2022, 10:58, "DK Singh" <dharam.mahi at gmail.com>: > > > Hi > > If any update operation is going on by others query then you won't be able to read the DB > > > > Please see Basex transaction Management > > > > Thanks > > > > On Fri, 30 Dec, 2022, 1:03 pm Ветошкин Владимир, <en-trance at yandex.ru> wrote: > > > > > Hi, > > > > > > Yes, it's opened by client's query first. While that query is in progress, I query "db:alter" for the same database. > > > How can I query "db:alter" after first query ends? > > > > > > Thank you > > > > > > 30.12.2022, 10:28, "DK Singh" <dharam.mahi at gmail.com>: > > > > > > > Hi,It seems that might be your DB is opened or your DB has Benn crashed > > > > > > > > Thanks > > > > > > > > On Fri, 30 Dec, 2022, 12:50 pm Ветошкин Владимир, <en-trance at yandex.ru> wrote: > > > > > > > > > Hello everyone > > > > > > > > > > I have an error "[db:lock] Database 'db' cannot be updated, it is opened by another process". > > > > > While client's "reading" query from 'db' in progress, I query "db:alter('newdb','db')" for the same database. > > > > > How can I wait for ending client's query and then "db:alter('newdb','db')"? > > > > > > > > > > Thanks for your help! > > > > > > > > > > > > > > > -- > > > > > С уважением, > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > -- > > > С уважением, > > > Ветошкин Владимир Владимирович > > > > > > -- > С уважением, > Ветошкин Владимир Владимирович >
-- С уважением, Ветошкин Владимир Владимирович
ВВ
Ветошкин Владимир30 Dec 2022 10:34 #
Perhaps, there was a one-time failure.
Quoted text · Ветошкин Владимир · 69 lines
30.12.2022, 11:30, "Ветошкин Владимир" <en-trance at yandex.ru>: > I don't know why, but can't repeat it locally. > First I query heavy reading operation on 'db', then I alter('dbcopy', 'db') and the second query waits ending the first. > > Why on the server the similar queries executed with errors, hmm. > > 30.12.2022, 11:08, "Ветошкин Владимир" <en-trance at yandex.ru>: > > > Hi, > > > > Yes, I know. But reading operation began executing first and not ended when the second query (db:alter) begins. > > > > 30.12.2022, 10:58, "DK Singh" <dharam.mahi at gmail.com>: > > > > > Hi > > > If any update operation is going on by others query then you won't be able to read the DB > > > > > > Please see Basex transaction Management > > > > > > Thanks > > > > > > On Fri, 30 Dec, 2022, 1:03 pm Ветошкин Владимир, <en-trance at yandex.ru> wrote: > > > > > > > Hi, > > > > > > > > Yes, it's opened by client's query first. While that query is in progress, I query "db:alter" for the same database. > > > > How can I query "db:alter" after first query ends? > > > > > > > > Thank you > > > > > > > > 30.12.2022, 10:28, "DK Singh" <dharam.mahi at gmail.com>: > > > > > > > > > Hi,It seems that might be your DB is opened or your DB has Benn crashed > > > > > > > > > > Thanks > > > > > > > > > > On Fri, 30 Dec, 2022, 12:50 pm Ветошкин Владимир, <en-trance at yandex.ru> wrote: > > > > > > > > > > > Hello everyone > > > > > > > > > > > > I have an error "[db:lock] Database 'db' cannot be updated, it is opened by another process". > > > > > > While client's "reading" query from 'db' in progress, I query "db:alter('newdb','db')" for the same database. > > > > > > How can I wait for ending client's query and then "db:alter('newdb','db')"? > > > > > > > > > > > > Thanks for your help! > > > > > > > > > > > > > > > > > > -- > > > > > > С уважением, > > > > > > Ветошкин Владимир Владимирович > > > > > > > > > > > > > > > > > > -- > > > > С уважением, > > > > Ветошкин Владимир Владимирович > > > > > > > > > > -- > > С уважением, > > Ветошкин Владимир Владимирович > > > > > -- > С уважением, > Ветошкин Владимир Владимирович >
-- С уважением, Ветошкин Владимир Владимирович
CG
Christian Grün1 Jan 2023 17:03 #
Hi Vladimir,
Quoted text · Ветошкин Владимир · 1 line
> I have an error "[db:lock] Database 'db' cannot be updated, it is opened by another process". While client's "reading" query from 'db' in progress, I query "db:alter('newdb','db')" for the same database. How can I wait for ending client's query and then "db:alter('newdb','db')"?
Which client/interface did you use to send db:alter? See [1] for more information on concurrent operations on databases. Best, Christian [1] https://docs.basex.org/wiki/Startup#Concurrent_Operations

⚡Generated with XQuery