|
From: Kuukka-Härmä R. <Rii...@fi...> - 2021-02-22 08:03:14
|
Hello,
We ended up to do clean eXist-4.7.1 db installation & restored database from backup. After that no references to multiple files, and no errors in backup report.
BR, Riina
From: Roy Walter <gar...@ya...>
Sent: tiistai 16. helmikuuta 2021 17.09
To: Kuukka-Härmä Riina <Rii...@fi...>
Cc: Exist-open <exi...@li...>
Subject: Re: [Exist-open] Issue with 4.7.1 eXist DB - file Id points to two different collection files
Hi,
How about creating an empty file, copying the contents of one of the problem files to it and then deleting the donor file.
Regards,
Roy
On Tuesday, 16 February 2021, 14:56:01 GMT, Kuukka-Härmä Riina <rii...@fi...<mailto:rii...@fi...>> wrote:
Hello,
Thank you for an answer. I tested the query setting
let $id := 11240
And it returned the path to same two XML files as using search with xs:string.
BR, Riina
From: Michael Westbay <wes...@ja...<mailto:wes...@ja...>>
Sent: tiistai 16. helmikuuta 2021 14.52
To: Kuukka-Härmä Riina <Rii...@fi...<mailto:Rii...@fi...>>
Cc: Exi...@li...<mailto:Exi...@li...>
Subject: Re: [Exist-open] Issue with 4.7.1 eXist DB - file Id points to two different collection files
Hi Riina,
You are setting you $id to an xs:string, not an xs:integer. Comparing strings of integers to integers often causes strange results.
Hope this helps.
Take care.
2021年2月16日(火) 19:35 Kuukka-Härmä Riina <Rii...@fi...<mailto:Rii...@fi...>>:
Hello,
Any ideas that what could be gone wrong are welcomed.
We have an issue in eXist 4.7.1 db-installation . Backup is failing for some files, and after investigating, we found that there is Document ID that is pointing two different files in separate collections.
Failed to access document data
Document ID: 11240
Investigating which file this is with query:
xquery version "3.1";
declare
function local:find($path, $document-id as xs:integer) as xs:string* {
local:find-in-collection($path, (), $document-id)
};
declare
function local:resource ($collection as xs:string, $resource as xs:string, $document-id as xs:integer) as xs:string? {
let $path := $collection || '/' || $resource
let $id := util:document-id($path)
return
if ($id eq $document-id)
then ($path)
else ()
};
declare
function local:find-in-collection ($collection as xs:string, $sub-collection as xs:string?, $document-id as xs:integer) as xs:string* {
let $path := string-join(($collection, $sub-collection), '/')
return
if (xmldb:collection-available($path))
then (
for-each(
xmldb:get-child-collections($path),
local:find-in-collection($path, ?, $document-id)
),
for-each(
xmldb:get-child-resources($path),
local:resource($path, ?, $document-id)
)
)
else ($path || " not found or insufficient permissions to read")
};
let $id := '11240'
return local:find('/db/APP', $id)
This returns two files:
"/db/APP/ORGANIZATION.A/CODE/INTERNAL/PUBLISHED/1603458557855/TOSELEMENTS/customFields.xml"
"/db/APP/ORGANIZATION.B/CODE/INTERNAL/PUBLISHED/1611822097512/TOSELEMENTS/strongEsignatureText.xml"
Howcome there can be returned two files with same id? How this can be fixed, is there any options than reinstall the database and return the content from backup? Should that fix the fileId:s eventually?
What I know, for some problematic files there is used eXist dashboard copy/paste functionality - but not all copy pasted files are having this issue.
Best Regards, Riina Kuukka-Härmä
_______________________________________________
Exist-open mailing list
Exi...@li...<mailto:Exi...@li...>
https://lists.sourceforge.net/lists/listinfo/exist-open
--
Michael Westbay
Writer/System Administrator
http://www.japanesebaseball.com/
_______________________________________________
Exist-open mailing list
Exi...@li...<mailto:Exi...@li...>
https://lists.sourceforge.net/lists/listinfo/exist-open
|