Reindex Container in dbxml shell.

Hello,
I am in the process of upgrading from 2.3.10 to 2.4.13. In the release notes, I read the following:
"Most queries will benefit from reindexing 2.3.X-based containers to add new structural statistics information used in query cost analysis. Reindexing is required in order to enable the substring index to be used on 1- and 2-character strings (a new feature in 2.4)."
OK, so I would like to have these statistics info added. According one of the other documents, I need the following parameters:
name
The path to the container to be reindexed.
context
The update context to use for the reindex operation.
flags
Use DBXML_INDEX_NODES to change the container's index type to node indexes, and use DBXML_NO_INDEX_NODES to change the index type to document indexes. Use DBXML_STATISTICS to add a structural statistics database to the container during reindexing, and DBXML_NO_STATISTICS to remove an existing structural statistics database.
The name of my container is system, but what should I use for context when I use it in the dbxml shell?
dbxml> reindexContainer system ????? DBXML_STATISTICS
What goes on the place of the ????.
As a general note, it would be helpful to add examples of commands to execute when upgrading from one version to the next.
Thanks in advance for your help.
Regards,
Bas.

Bas
The syntax used by the dbxml shell is different from that of the C++ API. The syntax for the shell for reindexContainer is:
dbxml> reindexContainer <containerName> <d|n>
To get the syntax and description of any command just use the following in the shell:
dbxml> help <command>
Although, it appears that the shell cannot be used to add the statistics database to your container. To do that you will have to write a small program that uses the C++ API.
Lauren

Similar Messages

  • Safe way to cancel queries in dbxml shell utility?

    Is there a (safe) way of cancelling a query you're running in the dbxml shell? Because I'm using a throwaway test container I've gone and used Ctrl-C a couple of times but it exits the shell completely so may be leaving the open container in a mess.
    If I had a working container properly set up with transaction support, locking, logging etc. and I wanted to test new XQueries from the shell afterwards, how would I interrupt queries which were slow, contained typos seen to late, etc.?
    There's an "abort" command but I don't think that's what I'm looking for as I'm not trying to stop transactions.
    Tim

    Tim,
    I assume you are adding some documents, then querying, and when that takes a long time, hitting ^C. In the 2.2.13 dbxml shell, the best way to ensure that your container is consistently on disk is to create the container, add documents, and then exit the shell.
    After that, you can restart the shell, open the container, and query/^C away and the container will still be intact. The reason is that exiting the shell closes the environment, which flushes the cache to the disk.
    As John mentioned, the upcoming 2.3 release has better ^C support in the shell. It also has a "sync" subcommand that flushes the cache to disk.
    Regards,
    George

  • Problem using dbxml shell with a replicated environment

    I'm having problems opening a container from the dbxml shell when in a replicated environment. When I issue the openContainer command I get the following error.
    dbxml> openContainer LocalConfigView.dbxml
    Non-replication DB_ENV handle attempting to modify a replicated environment
    stdin:1: openContainer failed, Error: Invalid argument
    I've read the documentation and the command line arguments for dbxml but I didn't see anything related to using the shell in a replicated database environment. Everything works fine in a non-replicated environment. I'm using dbxml-2.4.16 on a windows vista platform.
    Thanks for any information you can provide.
    Tom Perry

    You cannot use dbxml shell directly because it doesn't use DB_INIT_REP flag.
    You need to write a program using DB_INIT_REP flag or modify dbxml shell.

  • Dbxml Core Dump Seg Fault

    Hi - We are currently using dbxml for many years successfully on CentOS and FreeBSD.  Recently,we have been trying to get our dbxml application to run on Joyent's SmartOS platform. 
    Through the help of Joyent, we are able to build sbxml 2.5.16 binaries on smartos.  Build ntes here:
    https://github.com/joyent/smartos-live/issues/236
    However, when we run the application, the java core dumps - both on jdk 7 and jdk 6.  Same code runs find on other platforms.  Core dump is included in the above post.  Not sure if anyone here might have an idea on what is causing this. 

    Hi Lauren,
    Thanks for the response.  Here is what I posted about this on the smartos forums.  They helped me in getting dbxml to compile on smartos.  Including using an xquilla patch:
    OK, so the build problem you're having there appears to be an error in the C++ source for xqilla. This diff appears to fix that:
    --- pristine/dbxml-2.5.16/xqilla/src/items/DatatypeFactoryTemplate.hpp 2009-01-07 11:46:13.000000000 +0000 +++ dbxml-2.5.16/xqilla/src/items/DatatypeFactoryTemplate.hpp 2013-07-11 08:17:00.638395661 +0000 @@ -79,7 +79,7 @@ AnyAtomicType::Ptr createInstance(const XMLCh* value, const DynamicContext* context) const { - return createInstanceNoCheck(DatatypeFactoryTemplate<TYPE>::getPrimitiveTypeURI(), + return this->createInstanceNoCheck(DatatypeFactoryTemplate<TYPE>::getPrimitiveTypeURI(), DatatypeFactoryTemplate<TYPE>::getPrimitiveTypeName(), value, context); }
    Here is the post about the core dump:
    Hi - OK, so apparently, the newly compiled code core dumps the JVM every time I try to call the openContainer method.
    At first, I thought this was a code issue or a jdk 7 issue. However, I've compiled dbxml on smartos via the instructions in above thread using both jdk 6 and jdk 7 and I get the same core dump on the same call.
    Also, tested the code on jdk 7 and jdk 6 on FreeBSD, Linux and Solaris and everything works OK.
    I also thought it was a problem with my data, but I tried this create a fresh container using dbxml shell.
    Same thing. So it seems to be a problem with the dbxml build specific to smartos.
    Anyone have any ideas on where I can start looking for a solution?
    $ /opt/local/java/bin/java -d64 -cp ...
    srv context: java.io.BufferedInputStream@1f2f0ce
    A fatal error has been detected by the Java Runtime Environment:
    SIGSEGV (0xb) at pc=0x000000000028a89d, pid=4151, tid=2
    JRE version: 7.0_25-b15
    Java VM: Java HotSpot(TM) 64-Bit Server VM (23.25-b01 mixed mode solaris-amd64 compressed oops)
    Problematic frame:
    C 0x000000000028a89d
    Core dump written. Default location: /home/nxd/srv/adm/core or core.4151
    An error report file with more information is saved as:
    /home/nxd/srv/adm/hs_err_pid4151.log
    If you would like to submit a bug report, please visit:
    http://bugreport.sun.com/bugreport/crash.jsp
    Abort (core dumped)
    ========CORE DUMP
    A fatal error has been detected by the Java Runtime Environment:
    SIGSEGV (0xb) at pc=0x000000000028a89d, pid=4116, tid=2
    JRE version: 7.0_25-b15
    Java VM: Java HotSpot(TM) 64-Bit Server VM (23.25-b01 mixed mode solaris-amd64 compressed oops)
    Problematic frame:
    C 0x000000000028a89d
    Core dump written. Default location: /home/test/srv/adm/core or core.4116
    If you would like to submit a bug report, please visit:
    http://bugreport.sun.com/bugreport/crash.jsp
    The crash happened outside the Java Virtual Machine in native code.
    See problematic frame for where to report the bug.
    T H R E A D
    Current thread (0x000000000041e000): JavaThread "main" [_thread_in_native, id=2, stack(0xfffffd7ffe800000,0xfffffd7ffea00000)]
    siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x000000000028a89d
    Registers:
    RAX=0x000000000028a89d, RBX=0x0000000000000001, RCX=0x0000000002b27ea0, RDX=0x474e5543432b2b00
    RSP=0xfffffd7ffe9fec88, RBP=0xfffffd7ffe9fee30, RSI=0x0000000000000001, RDI=0x0000000000000001
    R8 =0xfffffd7ffe9fecb0, R9 =0xfffffd7fbfeb8e60, R10=0x0000000000000434, R11=0xfffffd7fff202df0
    R12=0x0000000002b27ec0, R13=0x0000000000000002, R14=0x0000000000000001, R15=0x0000000002b28630
    RIP=0x000000000028a89d, RFLAGS=0x0000000000010286
    Top of Stack: (sp=0xfffffd7ffe9fec88)
    0xfffffd7ffe9fec88: fffffd7fff2a2e50 fffffd7ffe9fecc0
    0xfffffd7ffe9fec98: 00000001ff3fc800 fffffd7ffe9fee50
    0xfffffd7ffe9feca8: 0000000002b27ea0 fffffd7ffe9fefa0
    0xfffffd7ffe9fecb8: fffffd7fff3b1422 0000000002b27ea0
    0xfffffd7ffe9fecc8: 0000000002b9b530 fffffd7fbfeefd90
    0xfffffd7ffe9fecd8: fffffd7ff53b7fb3 fffffd7ffe9ff190
    0xfffffd7ffe9fece8: fffffd7ffe9ff090 0000000000000000
    0xfffffd7ffe9fecf8: 0000000000000001 0000000000000000
    0xfffffd7ffe9fed08: ffffff00000000ff 0000000002b8cf00
    0xfffffd7ffe9fed18: fffffd7ffe9ff110 0000000002b1ea40
    0xfffffd7ffe9fed28: 0000000002582310 0000000000000000
    0xfffffd7ffe9fed38: 0000000000000001 6d2e42494c534f5f
    0xfffffd7ffe9fed48: 0000000002b1ea40 0000000000000000
    0xfffffd7ffe9fed58: 0000000000000000 fffffd7ffe9ff080
    0xfffffd7ffe9fed68: fffffd7ffe9ff000 0000000000000000
    0xfffffd7ffe9fed78: 0000000000000000 697600656e6f6e2d
    0xfffffd7ffe9fed88: 2d65646f6e007765 0000000002b27ec0
    0xfffffd7ffe9fed98: 0000000000000002 0000000000000001
    0xfffffd7ffe9feda8: 0000000002b28630 fffffd7ffe9ff090
    0xfffffd7ffe9fedb8: fffffd7fbfe81442 fffffd7fbfe3be1d
    0xfffffd7ffe9fedc8: fffffd7fbfc51f28 000000000028a89d
    0xfffffd7ffe9fedd8: fffffd7fbfe81108 fffffd7fbfeb8e60
    0xfffffd7ffe9fede8: 0000000000000434 fffffd7ffe9fecb0
    0xfffffd7ffe9fedf8: 0000000100000000 fffffd7fbfc9f120
    0xfffffd7ffe9fee08: 0000000002b1ea40 0000000002b27ec0
    0xfffffd7ffe9fee18: 0000000000000001 fffffd7ffe9fee50
    0xfffffd7ffe9fee28: 0000000002b27ea0 fffffd7ffe9fefb0
    0xfffffd7ffe9fee38: fffffd7fff2a302f 00000000000006c9
    0xfffffd7ffe9fee48: 0000000002b27ea0 fffffd7ffe9fefa0
    0xfffffd7ffe9fee58: fffffd7fff3b1422 0000000002b27ea0
    0xfffffd7ffe9fee68: 0000000002b9b530 fffffd7fbfeefd90
    0xfffffd7ffe9fee78: fffffd7ff53b7fb3 fffffd7ffe9ff190
    Instructions: (pc=0x000000000028a89d)
    0x000000000028a87d:
    [error occurred during error reporting (printing registers, top of stack, instructions near pc), id 0xb]
    Register to memory mapping:
    RAX=0x000000000028a89d is an unknown value
    RBX=0x0000000000000001 is an unknown value
    RCX=0x0000000002b27ea0 is an unknown value
    RDX=0x474e5543432b2b00 is an unknown value
    RSP=0xfffffd7ffe9fec88 is pointing into the stack for thread: 0x000000000041e000
    RBP=0xfffffd7ffe9fee30 is pointing into the stack for thread: 0x000000000041e000
    RSI=0x0000000000000001 is an unknown value
    RDI=0x0000000000000001 is an unknown value
    R8 =0xfffffd7ffe9fecb0 is pointing into the stack for thread: 0x000000000041e000
    R9 =0xfffffd7fbfeb8e60: _ZTSN5DbXml23DbXmlDebugHookDecoratorE+0x13040 in /home/test/srv/bdbxml.smartos_jdk7/lib/libdbxml-2.5.so at 0xfffffd7fbfc00000
    R10=0x0000000000000434 is an unknown value
    R11=0xfffffd7fff202df0: memcpy+0x60 in /lib/amd64/libc.so.1 at 0xfffffd7fff190000
    R12=0x0000000002b27ec0 is an unknown value
    R13=0x0000000000000002 is an unknown value
    R14=0x0000000000000001 is an unknown value
    R15=0x0000000002b28630 is an unknown value
    Stack: [0xfffffd7ffe800000,0xfffffd7ffea00000], sp=0xfffffd7ffe9fec88, free space=2043k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    C 0x000000000028a89d
    C [libc.so.1+0x11302f] SUNW_Unwind_RaiseException+0x50
    C [libstdc++.so.6.0.13+0x1380db] __cxa_throw+0x9b
    C [libdbxml-2.5.so+0x281442] DbXml::SyntaxDatabase::SyntaxDatabase(const DbXml::Syntax(_db_env*, DbXml::Transaction(std::basic_string < char, std::char_traits, std::allocator >, bool, const DbXml::ContainerConfig(bool)&)*)*)+0x33a
    C [libdbxml-2.5.so+0x23be1d] DbXml::Container::openIndexDbs(DbXml::Transaction(const DbXml::ContainerConfig&)*)+0x203
    C [libdbxml-2.5.so+0x23c5a5] DbXml::Container::openInternal(DbXml::Transaction(const DbXml::ContainerConfig(bool)&)*)+0x649
    C [libdbxml-2.5.so+0x23ce52] DbXml::Container::Container(DbXml::Manager(std::basic_string < char, std::char_traits, std::allocator >, DbXml::Transaction(const DbXml::ContainerConfig(bool)&)*)&)+0x212
    C [libdbxml-2.5.so+0x26e2f1] DbXml::Manager::ContainerStore::findContainer(void&, std::basic_string < char, std::char_traits, std::allocator >, DbXml::Transaction(const DbXml::ContainerConfig(bool)&)*)+0xb7
    C [libdbxml-2.5.so+0x26e4b9] DbXml::Manager::openContainer(std::basic_string < char, std::char_traits, std::allocator >, DbXml::Transaction(const DbXml::ContainerConfig(bool)&)*)+0x11b
    C [libdbxml-2.5.so+0x28fa45] DbXml::XmlManager::openContainer(std::basic_string < char, std::char_traits, std::allocator >, const DbXml::XmlContainerConfig&)+0x73
    C [libdbxml_java-2.5.so+0x61b68] Java_com_sleepycat_dbxml_dbxml_1javaJNI_XmlManager_1openContainerInternal_1_1SWIG_10+0x106
    j com.sleepycat.dbxml.dbxml_javaJNI.XmlManager_openContainerInternal__SWIG_0(JLcom/sleepycat/dbxml/XmlManager;Ljava/lang/String;[ILjava/lang/String;)J+0
    j com.sleepycat.dbxml.XmlManager.openContainerInternal(Ljava/lang/String;Lcom/sleepycat/dbxml/XmlContainerConfig;)Lcom/sleepycat/dbxml/XmlContainer;+18
    j com.sleepycat.dbxml.XmlManager.openContainer(Ljava/lang/String;Lcom/sleepycat/dbxml/XmlContainerConfig;)Lcom/sleepycat/dbxml/XmlContainer;+3
    j com.lightspoke.dbx.dao.DbxContainerManager.()V+411
    j com.lightspoke.dbx.service.DbxRMIEngine.()V+45
    j com.lightspoke.dbx.service.DbxRMIEngine.main([Ljava/lang/String;)V+29
    v ~StubRoutines::call_stub
    V [libjvm.so+0x54e5d1] void JavaCalls::call_helper(JavaValue*,methodHandle*,JavaCallArguments*,Thread*)+0x5d1
    V [libjvm.so+0x54e81b] void JavaCalls::call(JavaValue*,methodHandle,JavaCallArguments*,Thread*)+0x2b
    V [libjvm.so+0x638695] jni_CallStaticVoidMethod+0x5c1
    C [libjli.so+0x4d83] JavaMain+0x5e7
    C [libc.so.1+0x10cfaa] _thrp_setup+0x8a
    C [libc.so.1+0x10d2c0] _lwp_start+0x0
    Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
    j com.sleepycat.dbxml.dbxml_javaJNI.XmlManager_openContainerInternal__SWIG_0(JLcom/sleepycat/dbxml/XmlManager;Ljava/lang/String;[ILjava/lang/String;)J+0
    j com.sleepycat.dbxml.XmlManager.openContainerInternal(Ljava/lang/String;Lcom/sleepycat/dbxml/XmlContainerConfig;)Lcom/sleepycat/dbxml/XmlContainer;+18
    j com.sleepycat.dbxml.XmlManager.openContainer(Ljava/lang/String;Lcom/sleepycat/dbxml/XmlContainerConfig;)Lcom/sleepycat/dbxml/XmlContainer;+3
    j com.lightspoke.dbx.dao.DbxContainerManager.()V+411
    j com.lightspoke.dbx.service.DbxRMIEngine.()V+45
    j com.lightspoke.dbx.service.DbxRMIEngine.main([Ljava/lang/String;)V+29
    v ~StubRoutines::call_stub
    P R O C E S S
    Java Threads: ( => current thread )
    0x0000000002410000 JavaThread "Socket Server Thread-2" [_thread_in_native, id=20, stack(0xfffffd7ff4000000,0xfffffd7ff4200000)]
    0x0000000002405000 JavaThread "KaRMI Object Queue" daemon [_thread_blocked, id=19, stack(0xfffffd7ff4400000,0xfffffd7ff4600000)]
    0x00000000021eb800 JavaThread "Service Thread" daemon [_thread_blocked, id=17, stack(0xfffffd7ff4800000,0xfffffd7ff4a00000)]
    0x00000000021e9800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=16, stack(0xfffffd7ffe6ef000,0xfffffd7ffe7ef000)]
    0x00000000021e6800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=15, stack(0xfffffd7ffec0f000,0xfffffd7ffed0f000)]
    0x00000000021e4800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=14, stack(0xfffffd7ff4c00000,0xfffffd7ff4e00000)]
    0x000000000217b800 JavaThread "Finalizer" daemon [_thread_blocked, id=13, stack(0xfffffd7ff5000000,0xfffffd7ff5200000)]
    0x0000000002174800 JavaThread "Reference Handler" daemon [_thread_blocked, id=12, stack(0xfffffd7ffe000000,0xfffffd7ffe200000)]
    =>0x000000000041e000 JavaThread "main" [_thread_in_native, id=2, stack(0xfffffd7ffe800000,0xfffffd7ffea00000)]
    Other Threads:
    0x000000000216c000 VMThread [stack: 0xfffffd7ffe2af000,0xfffffd7ffe3af000] [id=11]
    0x0000000002205800 WatcherThread [stack: 0xfffffd7ffdeff000,0xfffffd7ffdfff000] [id=18]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    PSYoungGen total 19712K, used 16342K [0x00000000eaa00000, 0x00000000ec000000, 0x0000000100000000)
    eden space 16896K, 96% used [0x00000000eaa00000,0x00000000eb9f5a00,0x00000000eba80000)
    from space 2816K, 0% used [0x00000000ebd40000,0x00000000ebd40000,0x00000000ec000000)
    to space 2816K, 0% used [0x00000000eba80000,0x00000000eba80000,0x00000000ebd40000)
    ParOldGen total 43008K, used 0K [0x00000000c0000000, 0x00000000c2a00000, 0x00000000eaa00000)
    object space 43008K, 0% used [0x00000000c0000000,0x00000000c0000000,0x00000000c2a00000)
    PSPermGen total 22528K, used 7661K [0x00000000bae00000, 0x00000000bc400000, 0x00000000c0000000)
    object space 22528K, 34% used [0x00000000bae00000,0x00000000bb57b450,0x00000000bc400000)
    Card table byte_map: [0xfffffd7ff8c00000,0xfffffd7ff8e2a000] byte_map_base: 0xfffffd7ff8629000
    Polling page: 0xfffffd7fff000000
    Code Cache [0xfffffd7ff9000000, 0xfffffd7ff9400000, 0xfffffd7ffc000000)
    total_blobs=371 nmethods=41 adapters=283 free_code_cache=48554Kb largest_free_block=49715392
    Compilation events (10 events):
    Event: 0.848 Thread 0x00000000021e9800 nmethod 34 0xfffffd7ff9072a90 code [0xfffffd7ff9072be0, 0xfffffd7ff9072c78]
    Event: 0.848 Thread 0x00000000021e9800 35 java.util.ArrayList::get (11 bytes)
    Event: 0.848 Thread 0x00000000021e9800 nmethod 35 0xfffffd7ff90788d0 code [0xfffffd7ff9078a20, 0xfffffd7ff9078ad8]
    Event: 0.854 Thread 0x00000000021e9800 36 ! sun.misc.URLClassPath$JarLoader::getResource (91 bytes)
    Event: 0.894 Thread 0x00000000021e9800 nmethod 36 0xfffffd7ff9080490 code [0xfffffd7ff9080840, 0xfffffd7ff9082128]
    Event: 0.907 Thread 0x00000000021e9800 37 java.io.UnixFileSystem::parentOrNull (118 bytes)
    Event: 0.917 Thread 0x00000000021e9800 nmethod 37 0xfffffd7ff907ddd0 code [0xfffffd7ff907df40, 0xfffffd7ff907e598]
    Event: 0.968 Thread 0x00000000021e6800 nmethod 32 0xfffffd7ff908bf50 code [0xfffffd7ff908c660, 0xfffffd7ff90909c8]
    Event: 1.019 Thread 0x00000000021e9800 38 java.util.Arrays::copyOf (19 bytes)
    Event: 1.021 Thread 0x00000000021e9800 nmethod 38 0xfffffd7ff908a250 code [0xfffffd7ff908a3a0, 0xfffffd7ff908a578]
    GC Heap History (0 events):
    No events
    Deoptimization events (6 events):
    Event: 0.351 Thread 0x000000000041e000 Uncommon trap -34 fr.pc 0xfffffd7ff9062f04
    Event: 0.352 Thread 0x000000000041e000 Uncommon trap -34 fr.pc 0xfffffd7ff9062f04
    Event: 0.438 Thread 0x000000000041e000 Uncommon trap -83 fr.pc 0xfffffd7ff9067068
    Event: 0.638 Thread 0x000000000041e000 Uncommon trap -83 fr.pc 0xfffffd7ff9067908
    Event: 0.668 Thread 0x000000000041e000 Uncommon trap -83 fr.pc 0xfffffd7ff9076094
    Event: 0.669 Thread 0x000000000041e000 Uncommon trap -12 fr.pc 0xfffffd7ff9065848
    Internal exceptions (10 events):
    Event: 1.079 Thread 0x000000000041e000 Threw 0x00000000eb94b5b8 at /export/HUDSON/workspace/jdk7u25-2-build-solaris-amd64-product/jdk7u25/hotspot/src/share/vm/prims/jvm.c
    Event: 1.563 Thread 0x000000000041e000 Threw 0x00000000eb972960 at /export/HUDSON/workspace/jdk7u25-2-build-solaris-amd64-product/jdk7u25/hotspot/src/share/vm/prims/jvm.c
    Event: 1.564 Thread 0x000000000041e000 Threw 0x00000000eb9756c0 at /export/HUDSON/workspace/jdk7u25-2-build-solaris-amd64-product/jdk7u25/hotspot/src/share/vm/prims/jvm.c
    Event: 1.564 Thread 0x000000000041e000 Threw 0x00000000eb97fc60 at /export/HUDSON/workspace/jdk7u25-2-build-solaris-amd64-product/jdk7u25/hotspot/src/share/vm/prims/jvm.c
    Event: 1.565 Thread 0x000000000041e000 Threw 0x00000000eb983ed0 at /export/HUDSON/workspace/jdk7u25-2-build-solaris-amd64-product/jdk7u25/hotspot/src/share/vm/prims/jvm.c
    Event: 1.565 Thread 0x000000000041e000 Threw 0x00000000eb98d390 at /export/HUDSON/workspace/jdk7u25-2-build-solaris-amd64-product/jdk7u25/hotspot/src/share/vm/prims/jvm.c
    Event: 1.566 Thread 0x000000000041e000 Threw 0x00000000eb992830 at /export/HUDSON/workspace/jdk7u25-2-build-solaris-amd64-product/jdk7u25/hotspot/src/share/vm/prims/jvm.c
    Event: 1.566 Thread 0x000000000041e000 Threw 0x00000000eb996070 at /export/HUDSON/workspace/jdk7u25-2-build-solaris-amd64-product/jdk7u25/hotspot/src/share/vm/prims/jvm.c
    Event: 1.567 Thread 0x000000000041e000 Threw 0x00000000eb9a1d10 at /export/HUDSON/workspace/jdk7u25-2-build-solaris-amd64-product/jdk7u25/hotspot/src/share/vm/prims/jvm.c
    Event: 1.738 Thread 0x000000000041e000 Threw 0x00000000eb9a6840 at /export/HUDSON/workspace/jdk7u25-2-build-solaris-amd64-product/jdk7u25/hotspot/src/share/vm/prims/jvm.c
    Events (10 events):
    Event: 1.565 loading class 0x0000000002a678c0
    Event: 1.565 loading class 0x0000000002a678c0 done
    Event: 1.566 loading class 0x0000000002a67960
    Event: 1.566 loading class 0x0000000002a67960 done
    Event: 1.566 loading class 0x00000000022d9f00
    Event: 1.566 loading class 0x00000000022d9f00 done
    Event: 1.567 loading class 0x0000000002a67eb0
    Event: 1.567 loading class 0x0000000002a67eb0 done
    Event: 1.738 loading class 0x00000000022d9d40
    Event: 1.738 loading class 0x00000000022d9d40 done
    Dynamic libraries:
    0x0000000000400000 /opt/local/jdk1.7.0_25/bin/amd64/dbxrmijvm
    0xfffffd7ffd85c000 /usr/lib/amd64/libthread.so.1
    0xfffffd7ffd700000 /opt/local/jdk1.7.0_25/bin/amd64/../../jre/lib/amd64/jli/libjli.so
    0xfffffd7ffe56f000 /usr/lib/amd64/libdl.so.1
    0xfffffd7fff190000 /usr/lib/amd64/libc.so.1
    0xfffffd7ffc1a0000 /opt/local/jdk1.7.0_25/jre/lib/amd64/server/libjvm.so
    0xfffffd7ffea40000 /usr/lib/amd64/libsocket.so.1
    0xfffffd7ffd85b000 /usr/lib/amd64/libsched.so.1
    0xfffffd7ffc180000 /usr/lib/amd64/libm.so.1
    0xfffffd7ffc150000 /usr/lib/amd64/libCrun.so.1
    0xfffffd7ffdaef000 /usr/lib/amd64/libdoor.so.1
    0xfffffd7ffc110000 /usr/lib/amd64/libdemangle.so.1
    0xfffffd7ffeee0000 /usr/lib/amd64/libm.so.2
    0xfffffd7ffed10000 /usr/lib/amd64/libnsl.so.1
    0xfffffd7ffeab0000 /usr/lib/amd64/libmd.so.1
    0xfffffd7ffea90000 /usr/lib/amd64/libmp.so.2
    0xfffffd7ffc0f0000 /opt/local/jdk1.7.0_25/jre/lib/amd64/libverify.so
    0xfffffd7ffc0a0000 /opt/local/jdk1.7.0_25/jre/lib/amd64/libjava.so
    0xfffffd7ffe670000 /usr/lib/amd64/libscf.so.1
    0xfffffd7ffeba0000 /usr/lib/amd64/libuutil.so.1
    0xfffffd7ffead0000 /usr/lib/amd64/libgen.so.1
    0xfffffd7ffedb0000 /usr/lib/amd64/libnvpair.so.1
    0xfffffd7ffe650000 /usr/lib/amd64/libsmbios.so.1
    0xfffffd7ffc070000 /opt/local/jdk1.7.0_25/jre/lib/amd64/libzip.so
    0xfffffd7ffc040000 /opt/local/jdk1.7.0_25/jre/lib/amd64/libnet.so
    0xfffffd7ffc020000 /opt/local/jdk1.7.0_25/jre/lib/amd64/libnio.so
    0xfffffd7ffeb20000 /usr/lib/amd64/librt.so.1
    0xfffffd7ffc000000 /usr/lib/amd64/libsendfile.so.1
    0xfffffd7ffdd30000 /home/test/srv/bdbxml.smartos_jdk7/lib/libdb_java-4.8.so
    0xfffffd7ffdb60000 /usr/lib/amd64/libresolv.so.2
    0xfffffd7ffeacd000 /usr/lib/amd64/libpthread.so.1
    0xfffffd7ffe630000 /usr/lib/amd64/libgcc_s.so.1
    0xfffffd7ffe220000 /home/test/srv/bdbxml.smartos_jdk7/lib/libdbxml_java-2.5.so
    0xfffffd7ffd950000 /home/test/srv/bdbxml/lib/libdb-4.8.so
    0xfffffd7fc0400000 /home/test/srv/bdbxml/lib/libxqilla.so.5
    0xfffffd7fc0000000 /home/test/srv/bdbxml/lib/libxerces-c-3.0.so
    0xfffffd7fbfc00000 /home/test/srv/bdbxml/lib/libdbxml-2.5.so
    0xfffffd7ff5280000 /usr/lib/amd64/libstdc++.so.6
    VM Arguments:
    jvm_args: -Xss2048k -Djava.library.path=/home/test/srv/bdbxml/lib:/home/test/bdb/lib:/usr/lib:/usr/local/lib:/lib:/usr/lib/amd64: -Djava.rmi.server.codebase=/home/test/srv/lib/dbxrmi.jar -Duka.karmi.config=/home/test/srv/adm/.karmi.property -Djava.rmi.server.hostname=test.gaoxiong -Djava.security.policy=/home/test/adm/DbxRMI.policy -Dlog4j.configuration=file:/home/test/adm/log4j.xml
    java_command: com.lightspoke.dbx.service.DbxRMIEngine
    Launcher Type: SUN_STANDARD
    Environment Variables:
    JAVA_HOME=/opt/local/java
    PATH=/opt/local/java/bin:/home/test/srv/bdbxml/bin:/opt/local/java/bin:/home/test/srv/bdbxml/bin:/opt/local/java/bin:/home/test/srv/bdbxml/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/usr/sbin:/home/test/srv/bdbxml/bin:
    LD_LIBRARY_PATH=/home/test/srv/bdbxml/lib:/home/test/bdb/lib:/usr/lib:/usr/local/lib:/lib:/usr/lib/amd64:
    SHELL=/bin/bash
    Signal Handlers:
    SIGSEGV: [libjvm.so+0x11b37b4], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
    SIGBUS: [libjvm.so+0x11b37b4], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
    SIGFPE: [libjvm.so+0x53fc78], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
    SIGPIPE: [libjvm.so+0x53fc78], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
    SIGXFSZ: [libjvm.so+0x53fc78], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
    SIGILL: [libjvm.so+0x53fc78], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
    SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
    SIGUSR2: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
    SIGQUIT: [libjvm.so+0xff8ea8], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
    SIGHUP: [libjvm.so+0xff8ea8], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
    SIGINT: [libjvm.so+0xff8ea8], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
    SIGTERM: [libjvm.so+0xff8ea8], sa_mask[0]=0xffbffeff, sa_flags=0x00000004
    SIG39: [libjvm.so+0xffd27c], sa_mask[0]=0x00000000, sa_flags=0x00000008
    SIG40: [libjvm.so+0x53fc78], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c
    S Y S T E M
    OS: SmartOS x86_64
    Copyright 2010 Sun Microsystems, Inc. All Rights Reserved.
    Copyright 2010-2012 Joyent, Inc. All Rights Reserved.
    Use is subject to license terms.
    See uname -v for assembly date and time.
    uname:SunOS 5.11 joyent_20130530T224720Z i86pc
    (T2 libthread)
    rlimit: STACK 10240k, CORE infinity, NOFILE 65536, AS infinity
    load average:0.01 0.00 0.00
    CPU:total 8 (4 cores per cpu, 1 threads per core) family 6 model 15 stepping 11, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, tsc
    Memory: 4k page, physical 4194304k(4142372k free)
    vm_info: Java HotSpot(TM) 64-Bit Server VM (23.25-b01) for solaris-amd64 JRE (1.7.0_25-b15), built on Jun 5 2013 21:57:39 by "" with Sun Studio 12u1
    time: Tue Aug 6 01:12:44 2013
    elapsed time: 2 seconds

  • Explanation for exception?

    Hello,
    I am receiving the following exception periodically, normally after a number of successful inserts. For no obvious reason an insert to the large container (3.5GB) fails with the following exception
    transaction has active cursors
    PANIC: Invalid argument
    PANIC: fatal region error detected; run recovery
    XmlException 0, Error: Could not fetch next DOM element for doc id: 2242, nid: 1.0F
    After I do a recovery everything works fine for a while before I get the same.
    Any ideas?

    Hi George,
    Thanks for the response. I continued to have issues with the one container. On attempting to reindex with no other applications accessing the container the dbxml shell would segfault. I managed to extract an acceptable amount of data and then created a new container. I have not seen the problem again since I recreated the container.
    While I certainly think its possible there's a concurrency bug in my app the resolution by recreation of the container to me indicates I had corruption of some sort. The container itself is fairly old and was also used with dbxml 2.3. Previous application (using 2.3) bugs certainly have caused corruption as I had a number of problems with node names missing in documents after updatnig to 2.6 and reindexing.

  • Recovering container after failed reindexing

    Hi,
    I've tried to reindex a container, and reindexing failed with an error that locks table ran out of available locks. Then I increased the size of locks.
    Afterwards reindexing of a container failed with an error message: page 6111: illegal page type or format and DB XML suggested to run a recovery. I ran recovery, everything went fine. Then I re-ran reindexing, and again I got the page 6111: illegal page type or format and DbRunRecoveryException. And so on...(Reindexing->RunRecoveryException->Successfull recovery -> Reindexing ->RunRecoveryException ->Successfull recovery -> .... -> ....)
    I tried to use dbxml utility, it says that the container has been reindexed, however it hasn't been. On any next call dbxml shell crying for recovery. And so on again.
    Also queries that returned some results before, now return nothing.
    The question is: is it possible to recover a container in any way. Or in any case I should make a backup of a container (like suggested in the documentation), and use the backup exactly in these cases?
    Thanks,
    Vyacheslav

    Vyacheslav,
    If you believe that all useful content is in your container you can remove and re-create the environment. If there is indeed a bad page in the container that won't help but it's a start. You can also try using db_verify on the container file as well as dbxml_dump/dbxml_load. You may end up needing your backup though.
    Regards,
    George

  • Corrupt container

    Hi,
    Long time reader, first time writer. I'm in the development phase of a project using DbXml. During testing, one of my containers became corrupt. I've tried everything I know to recover the data.
    If I try to open the environment, it gives me a "Resource temporarily unavailable" error. I then try to run db_recover via the command line:
    kevinc$ cd /path/to/dbxml_files/
    kevinc$ db_recover -h /path/to/dbxml_files/
    db_recover: Recovery function for LSN 70 2990296 failed on backward pass
    db_recover: PANIC: No such file or directory
    db_recover: DB_ENV->open: DB_RUNRECOVERY: Fatal error, run database recovery
    If I run a "db_stat" or "db_verify" or "db_dump" or a "db_recover -f", I get an "unable to join environment" error.
    Some things that may (or may not) be relevant:
    - Only one environment is normally open at a time. (This may not have been true at the time of corruption, but the "bug" has since been fixed and the connection is no longer live once I tried the command line stuff.)
    - I can open and add to the container from the "dbxml" command line just fine.
    - I've reindexed the container.
    - Version: Oracle: Berkeley DB XML 2.4.16: (October 21, 2008)
    Berkeley DB 4.6.21: (September 27, 2007)
    - Fedora 9
    While it's not imperative to retrieve the data, I'd like to know for future reference, in case it happens again. Is there a way to recover the data?
    Thanks,
    Kevin

    Thanks eleddy and George.
    eleddy: I've not re/moved any of the log files (nor other files). As for deleting the environment files, you lost me...I mean, if I delete stuff, it's the same as deleting data, no? Disk space is ample and permissions have not been changed since it was working fine. I ran db_recover and other utils as root. Also, after dumping and recreating the containers, I am able to run db_recover with no problems.
    George: I've never thought about using the dbxml command line to extract the data...tho, it would be tedious, I guess that could work. I believe my environment became corrupt by writing data (and metadata) to the container, not closing that environment, and then searching on that metadata with a new environment. That bug is fixed. I've since started with fresh containers. However, after playing...I mean "programming" some more, I started a query that was going to take a while. (I hadn't indexed what I needed to index yet.) This time, I used the dbxml shell to do the testing. I killed that process so I could index and start over. Afterwards, I noticed my container was corrupt. I ran db_recover on it, and now I am getting errors saying to run database recovery using catastrophic recovery...which, I was doing anyway...I will address recovery questions to the BDB forum...
    Thanks again!

  • Dbxml:lookup-index fails with edge-element-presence

    The custom xquery function dbxml:lookup-index seems broken for edge-element-presence indices when a namespace is specified:
    dbxml> lookupedge edge-element-presence 'http://ceridwen.us/default' node11 'http://ceridwen.us/default' node1
    1 objects returned for eager index lookup 'edge-element-presence'
    dbxml> q "declare default element namespace 'http://ceridwen.us/default'; dbxml:lookup-index('test', 'node11', 'node1')"
    0 objects returned for eager expression 'declare default element namespace 'http://ceridwen.us/default'; dbxml:lookup-index('test', 'node11', 'node1')'
    dbxml> q "declare default element namespace 'http://ceridwen.us/default'; dbxml:lookup-index('test', 'node11')"
    2 objects returned for eager expression 'declare default element namespace 'http://ceridwen.us/default'; dbxml:lookup-index('test', 'node11')'Dbxml-2.5.16, OSX 10.6.4
    Edited by: jralls on Aug 22, 2010 12:22 PM

    Is this what you need?
    dbxml> listin
    Default Index: node-element-presence-none edge-element-presence-none
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/test}:dataType
    Index: node-attribute-equality-string node-attribute-equality-double for node {http://ceridwen.us/test}:elemType
    Index: node-attribute-equality-string node-attribute-equality-double for node {}:first
    Index: node-attribute-equality-string node-attribute-equality-double for node {http://ceridwen.us/test}:first
    Index: edge-attribute-equality-string node-attribute-equality-string node-attribute-equality-double for node {http://www.w3c.org/1999/xlink}:href
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/test}:name
    Index: unique-node-metadata-equality-string for node {http://www.sleepycat.com/2002/dbxml}:name
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/default}:node11
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/default}:node12
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/default2}:node2
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/default}:node311
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/default}:node312
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/default}:node321
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/default}:node322
    Index: node-element-equality-string node-element-equality-double for node {http://ceridwen.us/test}:ref
    Index: edge-attribute-equality-string node-attribute-equality-string node-attribute-equality-double for node {http://www.w3c.org/1999/xlink}:role
    Index: node-attribute-equality-string node-attribute-equality-double for node {http://www.w3c.org/1999/xlink}:second
    Index: node-attribute-equality-string node-attribute-equality-double for node {http://www.w3c.org/1999/xlink}:title
    Index: node-attribute-equality-string node-attribute-equality-double for node {http://www.w3c.org/1999/xlink}:type
    20 indexes found.This comes from
        DbXml::XmlContainer cnt = sto->getContainer();
        DbXml::XmlTransaction txn = m_mgr->createTransaction();
        try {
         DbXml::XmlUpdateContext uc = m_mgr->createUpdateContext();
         std::string xlink_uri("http://www.w3c.org/1999/xlink");
         std::string href("href");
         std::string role("role");
         std::string attr_eq("edge-attribute-equality-string");
         std::string node_pr("edge-element-presence-none");
         cnt.addIndex(txn, xlink_uri, href, attr_eq, uc);
         cnt.addIndex(txn, xlink_uri, role, attr_eq, uc);
         cnt.addDefaultIndex(txn, node_pr, uc);
         txn.commit();
        catch(DbXml::XmlException& e) {
         logError() << "XmlStorage: Opening container  " << name.sstr() << "  threw "
                 << e.what() << endl;
         throw;
        }There are only two documents in the container:
    <t:TestDoc xmlns:t="http://ceridwen.us/test" t:first="an attribute" xmlns:xlink="http://www.w3c.org/1999/xlink" xlink:second="another attribute">
       This is the root node of a test document
       <t:name>The Test Document</t:name>
       <t:dataType>TestDocument</t:dataType>
       <node1 xmlns="http://ceridwen.us/default" first="a node attribute">This element has 2 subnodes
           <node11>This is the first element under node 1</node11>
           <node12>This is the second element under node 1</node12>
       </node1>
       <node2 xmlns="http://ceridwen.us/default2">This element has three text nodes</node2>
       <node2 xmlns="http://ceridwen.us/default2">This is the second text node</node2>
       <node2 xmlns="http://ceridwen.us/default2">This element is the last one</node2>
       <Table xmlns="http://ceridwen.us/default">
          <t:DataRow t:elemType="Instance">
             <node311>First List Element</node311>
             <node312>Second List Element</node312>
          </t:DataRow>
          <t:DataRow t:elemType="Instance">
             <node321>Another First List Element</node321>
             <node322>Another Second List Element</node322>
          </t:DataRow>
       </Table>
       <?XmlStorage-html default-html?>
       <!--This is a gratuitous comment for testing.-->
    </t:TestDoc>
    <t:TestDoc xmlns:t="http://ceridwen.us/test" t:first="an attribute" xmlns:xlink="http://www.w3c.org/1999/xlink" xlink:second="another attribute">
       This is the root node of a test document
       <t:name>The Test Document</t:name>
       <t:dataType>TestDocument</t:dataType>
       <node1 xmlns="http://ceridwen.us/default" first="a node attribute">
          This element has 2 subnodes
          <node11>This is the first element under node 1</node11>
          <node12>This is the second element under node 1</node12>
       </node1>
       <node2 xmlns="http://ceridwen.us/default2">This element has three text nodes</node2>
       <node2 xmlns="http://ceridwen.us/default2">This is the second text node</node2>
       <node2 xmlns="http://ceridwen.us/default2">This element is the last one</node2>
       <Table xmlns="http://ceridwen.us/default">
          <t:DataRow t:elemType="Instance">
             <node311>First List Element</node311>
             <node312>Second List Element</node312>
          </t:DataRow>
          <t:DataRow t:elemType="Instance">
             <node321>Another First List Element</node321>
             <node322>Another Second List Element</node322>
          </t:DataRow>
       </Table>
       <?XmlStorage-html default-html?>
       <!--This is a gratuitous comment for testing.-->
       <t:ref xlink:href="dbxml:/test/The%20Test%20Document00000001" xlink:role="data:text/plain,reference" xlink:title="The Test Document"xlink:type="simple"/>
    </t:TestDoc>(Aside: It would be really nice if the dbxml shell's print command had a "pretty" option!)

  • Preformance issues when upgrading from dbxml 2.3.8 to 2.4.13

    I have recently upgraded my dbxml distribution from 2.3.8 to 2.4.13 (including the latest patch). I have noticed that many of the queries I issue take longer than they used to. Specifically if the query is complex it takes 10 times as long as it did with 2.3.8. Also I have noted a difference in speed between issuing the query via the dbxml shell (query takes ~45 seconds) vs issuing it through a c++ interface (query takes 4+ minutes). The query am issuing is:
    for $i in collection('projectDatabase.dbxml')/project
    where $i[obsblock/obsblockStatus eq 'INCOMPLETE' and obsblock/receiverBand eq '3MM' and obsblock/remainingTime >= 1.0 and ((obsblock/reqRaCoverage/@low <= 2.61799 and obsblock/reqRaCoverage/@low >= 0.654498) or (obsblock/reqRaCoverage/@high <= 2.61799 and obsblock/reqRaCoverage/@high >= 0.654498) or (0.654498 <= obsblock/reqRaCoverage/@high and 0.654498 >= obsblock/reqRaCoverage/@low) or ((obsblock/reqRaCoverage/@high < obsblock/reqRaCoverage/@low) and ((0.654498 <= obsblock/reqRaCoverage/@high) or (2.61799 <= obsblock/reqRaCoverage/@high) or (0.654498 >= obsblock/reqRaCoverage/@low) or (2.61799 >= obsblock/reqRaCoverage/@low)))) and obsblock/arrayConfiguration eq 'C' and projectID ne'opnt' and projectID ne'rpnt' and projectID ne'tilt' and projectID ne'fringe' and projectID ne'test']
    return $i
    if I simplify the query by removing references to the obsblock/reqRaCoverage/@low and obsblock/reqRaCoverage/@high nodes:
    for $i in collection('projectDatabase.dbxml')/project
    where $i[obsblock/obsblockStatus eq 'INCOMPLETE' and obsblock/receiverBand eq '3MM' and obsblock/remainingTime >= 1.0 and obsblock/arrayConfiguration eq 'C' and projectID ne'opnt' and projectID ne'rpnt' and projectID ne'tilt' and projectID ne'fringe' and projectID ne'test']
    return $i
    it returns much faster. I am wondering if this is an issue with optimization of the complex query?
    The database is fully indexed and was re-indexed when I upgraded to 2.4.13

    Doug,
    I've got your container. It's a wholedoc container with document indexes (a lot of them). Here's what I see for query speeds for your large, slow query using the dbxml shell.
    Query is:
    query "for $i in collection('pdb.dbxml')/project where $i[obsblock/obsblockStatus eq 'INCOMPLETE' and obsblock/receiverBand eq '3MM' and obsblock/remainingTime >= 1.0 and ((obsblock/reqRaCoverage/@low <= 2.61799 and obsblock/reqRaCoverage/@low >= 0.654498) or (obsblock/reqRaCoverage/@high <= 2.61799 and obsblock/reqRaCoverage/@high >= 0.654498) or (0.654498 <= obsblock/reqRaCoverage/@high and 0.654498 >= obsblock/reqRaCoverage/@low) or ((obsblock/reqRaCoverage/@high < obsblock/reqRaCoverage/@low) and ((0.654498 <= obsblock/reqRaCoverage/@high) or (2.61799 <= obsblock/reqRaCoverage/@high) or (0.654498 >= obsblock/reqRaCoverage/@low) or (2.61799 >= obsblock/reqRaCoverage/@low)))) and obsblock/arrayConfiguration eq 'C' and projectID ne'opnt' and projectID ne'rpnt' and projectID ne'tilt' and projectID ne'fringe' and projectID ne'test'] return $i"
    2.3.11 -- 2.4 seconds
    2.4.13 -- 60 seconds
    That is a significant slowdown and it needs further investigation but is almost certainly related to the fact that it is wholedoc storage. The optimizer appears to be choosing unwisely. This will take a few days to work out.
    I also changed the container to be node storage with node indexes and the times went to:
    2.3.11 -- 13 sec (slower than wholedoc)
    2.4.13 -- 40 sec (faster than wholedoc)
    I do know why your application is slower than the dbxml shell. There is a new flag that should almost always be used for wholedoc container queries -- DBXML_DOCUMENT_PROJECTION. Add that to you query excecution.
    Another thing -- query preparation is a bit slower in 2.4 so you should use prepared queries whenever possible to amortize that cost.
    Regards,
    George

  • Summary of DBXML 2.3.10 indexes

    We are running performance tests on our DBXML 2.3.10 database. There is still some question as to indexing numbers. Could someone briefly summarize the options? I don't think this is well documented (I could be wrong). For example:
    1. Integers - There is no index type for integer, so what should we use?
    2. Decimal -How does it differ from a float or double
    3. Float/double - I assume this is the same idea as in the C language; single and double precision? Why would I not always use double if I am not concerned about memory? Does one perform better than the other.
    Anthony

    John,
    Thanks for the summary. However, I must tell you that in terms of BDBXML, the decimal index does not function correctly based on our tests. I believe 2.3.8 cited problems, and I wrongly assumed 2.3.10 fixed it. Here are the details using DBXML Shell. I am using a container with 1125750 documents. A sample document is included at the end of the post
    dbxml> listindexes
    Index: node-element-equality-double for node {}:rabbits
    This lookupindex works fine with the double index:
    dbxml> time lookupindex node-element-equality-double {} rabbits
    1125750 objects returned for eager index lookup 'node-element-equality-double'
    Time in seconds for command 'lookupindex': 25.066
    We can also use query to get the same data:
    dbxml> time query 'for $a in collection("SCHEMA_1804635228.dbxml") where $a/sys:Metadata/sys:Published/theRabbit/theData[rabbits=1500] return $a'
    1500 objects returned for eager expression 'for $a in collection("SCHEMA_1804635
    228.dbxml") where $a/sys:Metadata/sys:Published/theRabbit/theData[rabbits=1500]
    return $a'
    Time in seconds for command 'query': 5.157
    Now I delete the index:
    dbxml> delindex {} rabbits node-element-equality-double
    Deleting index type: node-element-equality-double from node: {}:rabbits
    ...And add the index, only this time it is decimal:
    dbxml> addindex {} rabbits node-element-equality-decimal
    Adding index type: node-element-equality-decimal to node: {}:rabbits
    I verify the index:
    dbxml> listindexes
    Index: node-element-equality-decimal for node {}:rabbits
    A Lookupindex yields about the same performance as when it was a double:
    dbxml> time lookupindex node-element-equality-decimal {} rabbits
    1125750 objects returned for eager index lookup 'node-element-equality-decimal'
    Time in seconds for command 'lookupindex': 27.551
    Now if I try to run a query to get the same data, asI did when it was a double index the performance is extremely poor:
    dbxml> time query 'for $a in collection("SCHEMA_1804635228.dbxml") where $a/sys:
    Metadata/sys:Published/theRabbit/theData[rabbits=1500] return $a'
    1500 objects returned for eager expression 'for $a in collection("SCHEMA_1804635
    228.dbxml") where $a/sys:Metadata/sys:Published/theRabbit/theDat[rabbits=1500]
    return $a'
    Time in seconds for command 'query': 629.097
    I also tried to cast with similar results:
    dbxml> time query 'for $a in collection("SCHEMA_1804635228.dbxml") where $a/sys:
    Metadata/sys:Published/theRabbit/theData[rabbits=xs:decimal(1500)] return $a'
    1500 objects returned for eager expression 'for $a in collection("SCHEMA_1804635
    228.dbxml") where $a/sys:Metadata/sys:Published/theRabbit/theData[rabbits=xs:decimal(1500)] return $a'
    Time in seconds for command 'query': 651.19
    Sample document:
    sys:Metadata xmlns:sys="http://jbischemas.rl.af.mil/schemas/sys">
    <sys:Extended>
    <im:BaseObject xmlns:im="http://jbischemas.rl.af.mil/schemas/im">
    <im:InfoObjectType>
    <im:Name>mil.af.rl.oim.benchmark.rabbit</im:Name>
    <im:MajorVersion>1</im:MajorVersion>
    <im:MinorVersion>0</im:MinorVersion>
    </im:InfoObjectType>
    <im:PublicationTime>2007-06-23T01:57:10Z</im:PublicationTime>
    <im:InfoObjectID>4b6s1ot-fbp6si-f3907lwp-1-f39fyzol-o4n7</im:InfoObjectID>
    <im:PublisherID>4b6s1ot-fbp6si-f3907lwp-1-f390cm3c-d</im:PublisherID>
    <im:PlatformID>4b6s1ot-fbp6si-f3907lwp-1-f3908pog-4</im:PlatformID>
    </im:BaseObject>
    </sys:Extended>
    <sys:Published>
    <theRabbit>
    <theData>
    <rabbitUID>4b6s1ot-cpx4r3-f390ckhi-1-f390ckhx-2</rabbitUID>
    <sequence_order_number>1500</sequence_order_number>
    <total>1500</total>
    <time_stamp_in_milliseconds>1182563830805</time_stamp_in_milliseconds>
    <rabbits>1500</rabbits>
    </theData>
    </theRabbit>
    </sys:Published>
    </sys:Metadata>

  • Exporting XML from a container

    Getting XML documents into an XmlContainer seems easy enough, but how do I get them back out again into XML? I don't see anything in API that will export the documents once they're placed in the containers.
    The reason I'd like to do this is to use BDB XML with a source-control system. Basically, each user would check out a bunch of XML files from source control and create a local container. As changes to the XML files get checked in, they would update and re-add the changed XML files to their local container. When they make changes to their local xml data, I'd like to programmatically determine which documents changed (that part I can do myself) and then export those "edited" documents from the container back into XML format. Then the users can check in their changed documents.
    This seems like it would work except that there's no way to export XML documents once they're placed in the XmlContainer. I suppose I could write my own exporter without great difficulty, but it seems like such a basic thing that I feel like I must be missing something somewhere.
    Is there really no built-in export-to-xml capability?

    Hi Devnull,
    Getting XML documents into an XmlContainer seems easy
    enough, but how do I get them back out again into
    XML? I don't see anything in API that will export
    the documents once they're placed in the containers.If you want to export all the documents held by a container you can simply use the dbxml shell:
    dbxml>getDocuments
    dbxml>print >container_name.xml
    This seems like it would work except that there's no
    way to export XML documents once they're placed in
    the XmlContainer. I suppose I could write my own
    exporter without great difficulty, but it seems like
    such a basic thing that I feel like I must be missing
    something somewhere.Not quite sure if you want to export each document from the container in its own individual xml file or all the documents in a single xml file (if this is the case use the suggested shell commands, or implement it programmatically).
    A couple of methods that you could use to implement the exporting functionality that you desire are:
    o XmlContainer::getAllDocuments http://www.oracle.com/technology/documentation/berkeley-db/xml/api_cxx/XmlContainer_getAllDocuments.html
    -> using this method you could retrieve all the documents inside an xml container, as an xml result set
    o XmlResults::next
    http://www.oracle.com/technology/documentation/berkeley-db/xml/api_cxx/XmlResults_next.html
    -> use this method to iterate through the result set and get each document
    o XmlDocument::getContent
    http://www.oracle.com/technology/documentation/berkeley-db/xml/api_cxx/XmlDocument_getContent.html
    -> use this method to put the content of an xml document from the result set in a string; you could write it into an individual xml file or append it to a single xml file
    Regards,
    Andrei Costache
    Berkeley DB
    Oracle Support Services

  • Are there any command can list all container and XML doc which in DB

    When I use BDB XML shell,
    are there any command can list all container or xml document which in database,
    maybe like command dir(in windows), can list all exist directory and file.
    Thank very much.
    Henry Wang

    Hi Henry,
    When I use BDB XML shell,
    are there any command can list all container or xml
    document which in database,
    maybe like command dir(in windows), can list all
    exist directory and file.If you type "help" in the dbxml shell you'll get a list of all the commands available. As you will observe, you can use the "getDocuments" command to retrieve all the documents within a container. You will have to open the container first.
    If you want to list all the files within a directory you'll need to simply use the command prompt's "dir" (naming all your containers within a directory in the <container_name.dbxml> would allow you get the list by running a "dir *.dbxml" command).
    Not sure that this is what you really want, but if you would like to keep track of all the containers within a directory, or other directories, you can use a container with a special role, that of a catalogue, to hold the list of all created containers on disk, and eventually other specific information.
    Regards,
    Andrei

  • Querying a DBXML from Within

    Hi,
    I am relatively new to the concept of DBXML, but am loving every bit of it, especially our project is SOA based.
    My Question is that we can do this in shell
    dbxml>q 'collection()//x/string()'
    now what I want to ask is that, is there a way to store the Queries in kind of an XML file contained in a container using putdocument() such that we could do something like
    The Query.xml file
    <Q><q>collection()//x/string()</q></Q>
    the query in shell as
    dbxml> q 'let $i:=collection//q/string()
    return execute($i)'
    or something like that.
    Meaning the queries are stored in the DBXML container itself and are looked up as required and then executed, something like a view or Stored procedure functionality, so that we can keep these query files in container itself for better maintainability and manageability.
    Thanks

    Hi,
    Storing the queries as metadata inside a container may provide the functionality that you want. Metadata is information related in some way to a document but maintained separately.
    The string that represents the query can be stored as metadata for a dedicated document (this document can be an empty one, as it doesn't need to contain any information) that represent the query. You can retrieve the query string than use it to subsequently perform the get operations you want. The dbxml shell is somehow limited in that it doesn't allow you to redirect and execute the query represented by the string result of a previous query (contextQuery is used to query against the last results as the context item). So, you can implement this programmatically using one of the APIs available.
    Or you may want to store all your queries in a separate dedicated container.
    A short example in the dbxml shell would be:
    - store a query as metadata for an empty document inside the container:
    dbxml> setMetadata q1 "" querystring string "collection()//x/string()"
    - retrieve the query from the q1 document's metadata:
    dbxml> query "doc('container.dbxml/q1')/dbxml:metadata('querystring')"
    - programmatically you would use the stored query and execute it against the container; this could will imply XmlManager::query, XmlResults::next, XmlValue::asString and another XmlManager::query call, or alternatively using XmlQueryExpression::execute.
    Regards,
    Andrei

  • Cryptsetup, cannot open luks container

    Hi all
    I am unable to open a luks container which was created with an old version of cryptsetup. I tried to downgrade cryptsetup and libgcrypt to all versions I still have in /var/cache/pacman but no success...
    I am certain of the password I used. Error is: No key available with this Passphrase.
    Any help would be appreciated.
    luksDump of the file looks like that:
    # cryptsetup 1.6.1 processing "cryptsetup luksDump /dev/loop0 --debug"
    # Running command luksDump.
    # Locking memory.
    # Installing SIGINT/SIGTERM handler.
    # Unblocking interruption on signal.
    # Allocating crypt device /dev/loop0 context.
    # Trying to open and read device /dev/loop0.
    # Initialising device-mapper backend library.
    # Trying to load LUKS1 crypt type from device /dev/loop0.
    # Crypto backend (gcrypt 1.5.3) initialized.
    # Reading LUKS header of size 1024 from device /dev/loop0
    # Key length 32, device size 524288 sectors, header size 2050 sectors.
    LUKS header information for /dev/loop0
    Version:           1
    Cipher name:       aes
    Cipher mode:       xts-plain64
    Hash spec:         sha1
    Payload offset:    4096
    MK bits:           256
    MK digest:         29 d7 7b 19 f1 7a 03 fa 29 88 e1 39 dd 15 c8 68 52 8c 36 29
    MK salt:           44 dc b8 e8 5e ce ac f1 22 53 a0 c8 f0 2a 82 f9
                       72 87 c2 49 34 88 a1 4b 3c a6 06 02 f9 e9 2c 3a
    MK iterations:     120000
    UUID:              13df8e22-a49d-437a-99d8-a4b59c6a40ee
    Key Slot 0: ENABLED
        Iterations:             501959
        Salt:                   6e a2 32 95 25 ec 52 56 4d ef 01 7d 20 6c c1 11
                                  36 88 23 ea 60 54 79 fb 61 fe 4a 23 dc 07 8c 9b
        Key material offset:    8
        AF stripes:                4000
    Key Slot 1: DISABLED
    Key Slot 2: DISABLED
    Key Slot 3: DISABLED
    Key Slot 4: DISABLED
    Key Slot 5: DISABLED
    Key Slot 6: DISABLED
    Key Slot 7: DISABLED
    # Releasing crypt device /dev/loop0 context.
    # Releasing device-mapper backend.
    # Unlocking memory.

    Hi,
    If you want to do concurrent access between a Java process and the dbxml shell you should create your environment first in your java program. That will allow you to specify any configuration parameters that you want.
    Then when you bring up the shell using that new environment you will see a message that you joined the environment.
    So I took your java program and created a temporary environment in d:\junk. Then from that directory I simply invoked the shell:
    D:\junk>dbxml
    Joined existing environment
    The way you did things, from the shell you created a private environment (by default). In Berkeley DB, if two processes need read/write access to a database they must share a Berkeley DB environment. That is what you created in your java app.
    Alternatively, you could have exited the shell prior to accessing the container from your java application.
    Regards,
    Ron

  • How to change the page size of a replicated container?

    Hi, I would like to change the page size of dbxml 2.3.10.10 containers in a replicated environment.
    This is what I tried so far:
    1) dbxml_dump/dbxml_load (bot utils not usable in a replicated environment)
    2) db_dump/db_load. db_dump works fine. db_load seems to work fine, since it succesfully creates a database/container from a dump file. But it does not correctly initialise the internal dbxml structures since the database/container can not be opened, although getContainers works...
    Besides writing my own dump/load clients, is there any other option to change the page size of an existing container?
    Regards,
    Jacobus Geluk

    Hi George,
    dbxml_dump seems to work fine, but ends with this message:
    DATA=END
    dbxml_dump: Non-replication DB_ENV handle attempting to modify a replicated environment
    dbxml_dump: dump <container name>.dbxml: Error: Unexpected error opening Configuration DB
    dbxml_load more or less has the same error...
    I am currently writing a little Java program that simply dumps all XML documents of all containers in a directory structure...
    That would work as long as the file system can handle it...
    I suppose dbxml_dump/load could be made to work quite easily by just copying their sources and specifiying the replication settings...
    All utilities that cause log activity, that currently do not support replicated environments, should support replicated environments that simply use the default replication transport mechanism. With some additional command line options like --sites it would work...
    Regards,
    Jacobus

Maybe you are looking for