Using
11.0 beta e461f98 on centos.
What I’m seeing on both Linux and macOS for databases that appear to never finish optimizing, is that the various index files reflect the current time stamp, meaning they have been written to, where the upd.basex file’s time stamp reflects
the time the optimization was started:
[eliot.kimber.adm@uswdlsolr03 _temp_lrk_washingtondc_link_records]$ ls -al
total 245416
drwxr-xr-x. 2 eliot.kimber.adm domain users 4096 Mar 3 15:24 .
drwxr-xr-x. 34 eliot.kimber.adm domain users 12288 Mar 3 17:17 ..
-rw-r--r--. 1 eliot.kimber.adm domain users 59763275 Mar 3 17:27 atv.basex
-rw-r--r--. 1 eliot.kimber.adm domain users 5988029 Mar 3 17:27 atvl.basex
-rw-r--r--. 1 eliot.kimber.adm domain users 2257240 Mar 3 17:27 atvr.basex
-rw-r--r--. 1 eliot.kimber.adm domain users 236 Mar 3 15:24 ftxx.basex
-rw-r--r--. 1 eliot.kimber.adm domain users 205425 Mar 3 15:24 ftxy.basex
-rw-r--r--. 1 eliot.kimber.adm domain users 1339905 Mar 3 15:24 ftxz.basex
-rw-r--r--. 1 eliot.kimber.adm domain users 15 Mar 3 15:24 idp.basex
-rw-r--r--. 1 eliot.kimber.adm domain users 14128 Mar 3 15:24 inf.basex
-rw-r--r--. 1 eliot.kimber.adm domain users 67 Mar 3 15:24 pth.basex
-rw-r--r--. 1 eliot.kimber.adm domain users 28 Mar 3 15:24 swl.basex
-rw-r--r--. 1 eliot.kimber.adm domain users 67334144 Mar 3 17:27 tbl.basex
-rw-r--r--. 1 eliot.kimber.adm domain users 9 Mar 3 15:24 tbli.basex
-rw-r--r--. 1 eliot.kimber.adm domain users 109991241 Mar 3 17:27 tokl.basex
-rw-r--r--. 1 eliot.kimber.adm domain users 2361275 Mar 3 17:27 tokr.basex
-rw-r--r--. 1 eliot.kimber.adm domain users 1442904 Mar 3 17:22 txt.basex
-rw-r--r--. 1 eliot.kimber.adm domain users 295757 Mar 3 15:24 txtl.basex
-rw-r--r--. 1 eliot.kimber.adm domain users 243050 Mar 3 15:05 txtr.basex
-rw-r--r--. 1 eliot.kimber.adm domain users 0 Mar 3 15:24 upd.basex
Here, 17:27 is the time I ran the ls command and 15:24 is the time the optimization request was submitted:
JOB:orch:job12_1709468383163 |
admin |
REQUEST |
0.00 |
NEW INITIALIZE WORKTREE washingtondc: dbadmin:optimizeDatabase('_temp_lrk_washingtondc_link_records') |
Where dbadmin:optimizeDatabase() is:
declare updating function dbadmin:optimizeDatabase(
$database as xs:string
) {
try {
if (db:exists($database))
then
(
util:logToConsole('dbadmin:optimizeDatabase', ``[Optimizing database `{$database}`...]``),
db:optimize($database, true(), $dbadmin:dbOptimizeOptions),
util:logToConsole('dbadmin:optimizeDatabase', ``[Database `{$database}` optimized.]``)
)
else util:logToConsole('dbadmin:optimizeDatabase', ``[Database '`{$database}`' does not exist. Nothing to optimize.]``)
} catch * {
util:logToConsole(
'dbadmin:optimizeDatabase',
``[Exception optimizing database '`{$database}`': `{$err:code}` - `{$err:description}`]``,
'error')
}
};
And $dbadmin:dbOptimizeOptions is:
declare variable $dbadmin:dbOptimizeOptions as map(*) :=
(: Turn on all the indexes :)
map {
'attrindex' : true(),
'tokenindex' : true(),
'textindex' : true(),
'ftindex' : true()
};
Cheers,
E.
_____________________________________________
Eliot Kimber
Sr Staff Content Engineer
O: 512 554 9368
M: 512 554 9368
LinkedIn | Twitter | YouTube | Facebook