Hi all, I have a single resource in a db. I perform several replace operations on that resource. The dba interface shows an increasing number of resources available in the db according to the number of replace operations performed. To get the count of resources back to 1 I need to optimize the database. When opening the database the visible content is however correct (showing the only one resource). Feels like dba is somehow lagging the information displayed with respect to the db content .... Regards, Marco.
Hello Marco,
sorry for letting you wait. It sound like a bug in the DBA. However, I was unable to reproduce the issue. Could you please clarify what you did?
I tried (using 8.4.4.): - Created a new database and added a resource - I replaced this resource using db:replace within the DBA. - Checked the database tab (i.e. http://localhost:8984/dba/databases), but the "resources" column did show the correct count of 1.
Cheers Dirk
On 05/11/2016 02:42 PM, Marco Lettere wrote:
Hi all, I have a single resource in a db. I perform several replace operations on that resource. The dba interface shows an increasing number of resources available in the db according to the number of replace operations performed. To get the count of resources back to 1 I need to optimize the database. When opening the database the visible content is however correct (showing the only one resource). Feels like dba is somehow lagging the information displayed with respect to the db content .... Regards, Marco.
Hi Dirk, first of all sorry if I reposted the email but my email client didn't show yesterday's email in the sent folder ... Then what you've done is pretty much what I did with the only difference being the db:replace performed from inside a RestXQ function. That's it. I could not see any other difference and I used a "latest release" of few days ago (8.4.4 beta 6d8606a). Hope this can help you. M.
On 11/05/2016 15:09, Dirk Kirsten wrote:
Hello Marco,
sorry for letting you wait. It sound like a bug in the DBA. However, I was unable to reproduce the issue. Could you please clarify what you did?
I tried (using 8.4.4.):
- Created a new database and added a resource
- I replaced this resource using db:replace within the DBA.
- Checked the database tab (i.e. http://localhost:8984/dba/databases),
but the "resources" column did show the correct count of 1.
Cheers Dirk
On 05/11/2016 02:42 PM, Marco Lettere wrote:
Hi all, I have a single resource in a db. I perform several replace operations on that resource. The dba interface shows an increasing number of resources available in the db according to the number of replace operations performed. To get the count of resources back to 1 I need to optimize the database. When opening the database the visible content is however correct (showing the only one resource). Feels like dba is somehow lagging the information displayed with respect to the db content .... Regards, Marco.
Hello Marco,
no worries - Otherwise it would have been unlikely I would have remembered your mail...
Could you maybe check with BaseX 8.4.4 or the lastest release ( was before 8.4.4.), maybe something fixed the issue. However, I think this is highly unlikely looking at the commits in between.
When you see the error, could you maybe run db:list-details() and see what the resources attributes are reporting? Because the dba simply uses this command to show the number of resources within the databases.
Cheers, Dirk
On 05/11/2016 03:15 PM, Marco Lettere wrote:
Hi Dirk, first of all sorry if I reposted the email but my email client didn't show yesterday's email in the sent folder ... Then what you've done is pretty much what I did with the only difference being the db:replace performed from inside a RestXQ function. That's it. I could not see any other difference and I used a "latest release" of few days ago (8.4.4 beta 6d8606a). Hope this can help you. M.
On 11/05/2016 15:09, Dirk Kirsten wrote:
Hello Marco,
sorry for letting you wait. It sound like a bug in the DBA. However, I was unable to reproduce the issue. Could you please clarify what you did?
I tried (using 8.4.4.):
- Created a new database and added a resource
- I replaced this resource using db:replace within the DBA.
- Checked the database tab (i.e. http://localhost:8984/dba/databases),
but the "resources" column did show the correct count of 1.
Cheers Dirk
On 05/11/2016 02:42 PM, Marco Lettere wrote:
Hi all, I have a single resource in a db. I perform several replace operations on that resource. The dba interface shows an increasing number of resources available in the db according to the number of replace operations performed. To get the count of resources back to 1 I need to optimize the database. When opening the database the visible content is however correct (showing the only one resource). Feels like dba is somehow lagging the information displayed with respect to the db content .... Regards, Marco.
Hey Dirk, db:list-details() executed from the dba query panel returns:
<database resources="24" modified-date="2016-05-11T13:23:32.000Z" size="39870" path="">projects</database> <database resources="0" modified-date="2016-05-09T16:55:06.000Z" size="4578" path="">runnables</database> <database resources="1" modified-date="2016-05-09T17:44:42.000Z" size="4740" path="">users</database>
whereas db:list-details('projects') returns:
<resource raw="false" content-type="application/xml" modified-date="2016-05-11T13:23:32.473Z" size="111">testproject.xml</resource>
The second is clearly the right one since that db contains only one resource repeatedly updated. I don't understand exactly what the size attribute is indicating since for the empty dbs it's even larger ....
If I have some time this evening I'll try with the latest possible snapshot. Thanks, M.
On 11/05/2016 15:40, Dirk Kirsten wrote:
Hello Marco,
no worries - Otherwise it would have been unlikely I would have remembered your mail...
Could you maybe check with BaseX 8.4.4 or the lastest release ( was before 8.4.4.), maybe something fixed the issue. However, I think this is highly unlikely looking at the commits in between.
When you see the error, could you maybe run db:list-details() and see what the resources attributes are reporting? Because the dba simply uses this command to show the number of resources within the databases.
Cheers, Dirk
On 05/11/2016 03:15 PM, Marco Lettere wrote:
Hi Dirk, first of all sorry if I reposted the email but my email client didn't show yesterday's email in the sent folder ... Then what you've done is pretty much what I did with the only difference being the db:replace performed from inside a RestXQ function. That's it. I could not see any other difference and I used a "latest release" of few days ago (8.4.4 beta 6d8606a). Hope this can help you. M.
On 11/05/2016 15:09, Dirk Kirsten wrote:
Hello Marco,
sorry for letting you wait. It sound like a bug in the DBA. However, I was unable to reproduce the issue. Could you please clarify what you did?
I tried (using 8.4.4.):
- Created a new database and added a resource
- I replaced this resource using db:replace within the DBA.
- Checked the database tab (i.e.
http://localhost:8984/dba/databases), but the "resources" column did show the correct count of 1.
Cheers Dirk
On 05/11/2016 02:42 PM, Marco Lettere wrote:
Hi all, I have a single resource in a db. I perform several replace operations on that resource. The dba interface shows an increasing number of resources available in the db according to the number of replace operations performed. To get the count of resources back to 1 I need to optimize the database. When opening the database the visible content is however correct (showing the only one resource). Feels like dba is somehow lagging the information displayed with respect to the db content .... Regards, Marco.
-- Dirk Kirsten, BaseX GmbH,http://basexgmbh.de |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle `-- Phone: 0049 7531 91 68 276, Fax: 0049 7531 20 05 22
Hi Marco,
Something has clearly gone wrong while you were replacing resources in your database. I assume it’s a general issue, and not due to DBA, as the latter one only is only an interface.
Do you think there’s some chance to make the results reproducible for us? It can also be a step-by-step explanation, base on the DBA.
The size attribute contains the database size, measured in bytes; see [1] for a slightly updated documentation.
Thanks, Christian
[1] http://docs.basex.org/wiki/Database_Module#db:list-details
On Wed, May 11, 2016 at 4:25 PM, Marco Lettere m.lettere@gmail.com wrote:
Hey Dirk, db:list-details() executed from the dba query panel returns:
<database resources="24" modified-date="2016-05-11T13:23:32.000Z" size="39870" path="">projects</database> <database resources="0" modified-date="2016-05-09T16:55:06.000Z" size="4578" path="">runnables</database> <database resources="1" modified-date="2016-05-09T17:44:42.000Z" size="4740" path="">users</database>
whereas db:list-details('projects') returns:
<resource raw="false" content-type="application/xml" modified-date="2016-05-11T13:23:32.473Z" size="111">testproject.xml</resource>
The second is clearly the right one since that db contains only one resource repeatedly updated. I don't understand exactly what the size attribute is indicating since for the empty dbs it's even larger ....
If I have some time this evening I'll try with the latest possible snapshot. Thanks, M.
basex-talk@mailman.uni-konstanz.de