Missing properties for 'currentStatus'

Problem description

Database properties provided on creation are not shown using the currentStatus API

Reproduction

Using Stardog 5.0.5, the database was created with the following command:

stardog-admin db create -n stardog -v -o versioning.enabled=true preserve.bnode.ids=false

The following Java instruction:

System.out.println(connection.admin().currentStatus(true));

provides this output:

{  
   dbms.home=/data,
   dbms.mem.mapped.max=120795955,
   databases.stardog.queries.speed=   {  
      mean_rate=0.0,
      max=0.0,
      count=0,
      p50=0.0,
      p95=0.0,
      p98=0.0,
      p75=0.0,
      m1_rate=0.0,
      rate_units=calls/second,
      p99=0.0,
      min=0.0,
      duration_units=seconds,
      mean=0.0,
      p999=0.0,
      stddev=0.0,
      m15_rate=0.0,
      m5_rate=0.0
   },
   dbms.mem.direct.used=26054687,
   dbms.query.timeout=5m,
   dbms.memory.management=NATIVE,
   dbms.query.pp.contexts=false,
   databases.system.planCache.size=3,
   dbms.logging.connection.events.enabled=true,
   system.uptime=28156,
   dbms.mem.system.rss=578326528,
   dbms.memory.monitor.report.threshold=0.9,
   dbms.mem.mapped.used=25165824,
   dbms.upgrade.automatic=false,
   dbms.memory.heap.reserve=,
   databases.system.planCache.ratio=0.25,
   dbms.security.disabled=false,
   dbms.mem.direct.buffer.used=126976,
   dbms.strict.parsing=true,
   dbms.password.length.min=4,
   dbms.rotate.old.tx.logs=false,
   databases.stardog.txns.speed=   {  
      mean_rate=0.0,
      max=0.0,
      count=0,
      p50=0.0,
      p95=0.0,
      p98=0.0,
      p75=0.0,
      m1_rate=0.0,
      rate_units=calls/second,
      p99=0.0,
      min=0.0,
      duration_units=seconds,
      mean=0.0,
      p999=0.0,
      stddev=0.0,
      m15_rate=0.0,
      m5_rate=0.0
   },
   dbms.logging.connection.startend.events.enabled=true,
   dbms.memory.mode=DEFAULT,
   dbms.type=Community,
   dbms.mem.heap.max=1029177344,
   dbms.data.dir=/tmp,
   databases.stardog.planCache.size=1,
   dbms.metrics.enabled=true,
   dbms.query.timeout.override.enabled=true,
   dbms.mem.direct.pool.used=0,
   databases.stardog.planCache.ratio=0.0,
   dbms.server.port=5820,
   dbms.pack.enabled=false,
   databases.stardog.queries.running=0,
   system.os=Linux 4.4.89-boot2docker, Java 1.8.0_151,
   dbms.page.cache.ratio=0.49933598937583,
   dbms.version=5.0.5,
   dbms.security.named.graphs=true,
   dbms.spilling.dir=.spilling,
   dbms.security.named.graphs.empty.allows.access=false,
   databases.stardog.openConnections=0,
   system.cpu.usage=0.1281583631184142,
   dbms.memory.managed.direct=,
   dbms.security.realms=stardog,
   dbms.backup.dir=.backup,
   dbms.memory.direct.reserve=,
   dbms.mem.heap.used=34144008,
   dbms.query.all.graphs=true,
   dbms.mem.heap.pool.used=0,
   dbms.page.cache.weight=9232,
   dbms.page.cache.size=2,
   dbms.export.dir=.exports,
   system.arch=amd64,
   dbms.mem.direct.max=1073741824,
   dbms.mem.direct.buffer.max=281857228,
   dbms.cors.allowed.origins=   [],
   dbms.mem.direct.pool.max=402653184,
   dbms.memory.managed.heap=,
   dbms.memory.monitor.interval=600000,
   databases.stardog.txns.openTransactions=0,
   dbms.id=47a25594-2bb2-4e18-b05c-ccdadcdd529a,
   dbms.mem.heap.pool.max=0,
   dbms.database.connection.timeout=1h
}

Neither versioning.enabled nor preserve.bnode.ids can be found in the provided map.

Is this a bug or intended behaviour? If so, is there another API to get this information?

Thanks in advance!

Ruben

Hi Ruben,

Those values are actually part of the metadata for a given database, which is retrieved via AdminConnection.get(). In your case you could do the following:

List<ConfigProperty<Boolean>> aPropsIWant = Arrays.asList(
        DatabaseOptions.PRESERVE_BNODE_IDS,
        VersioningOptions.ENABLED
    );
System.out.println(aConn.admin().get("stardog", aPropsIWant));

Hi Stephen!

I just tested it and got this output:

{preserve.bnode.ids=false}

Seems like the VersioningOptions.ENABLED property was not retreived…

Versioning however is active, I sent updates and the versioning history is consistent.

Hi Stephen!

Any words on when/if this issue is getting addressed to?

Hi Ruben,

Sorry about the lack of response on this thread! After some more research I discovered that the Stardog server (5.1.0, at least) is returning the versioning.enabled piece of metadata, but the client is ignoring it. I found that if you simply add the line MetaProperties.register(VersioningOptions.class); before your aConn.admin().get() call it will actually include those options in its output

Hi Stephen!

The workaround works. However, this does not affect the output of connection.admin().currentStatus(true).
Will this issue be fixed for the next release? Or further down the line?

Thanks in advance!

Ruben,

connection.admin().currentStatus(true) returns the server options, while versioning.enabled and preserve.bnode.ids are database-level metadata and therefore can only be retrieved from the admin().get method.