StreamBase on-disk Query Table error BDB0088 DB_SECONDARY_BAD: Secondary index inconsistent with primary

StreamBase on-disk Query Table error BDB0088 DB_SECONDARY_BAD: Secondary index inconsistent with primary

book

Article ID: KB0078353

calendar_today

Updated On:

Products Versions
TIBCO Streaming 7.x

Description

We get this error and cannot start the StreamBase server:
 
[ERROR] SystemModule - Unable to create error message: 
com.streambase.sb.runtime.exceptions.EvalException: unable to create translation utils
com.streambase.sb.runtime.exceptions.EvalException: BDB0088 DB_SECONDARY_BAD: 
Secondary index inconsistent with primary (1075)

Issue/Introduction

Root cause analysis and recovery

Resolution

This error indicates corruption in the disk-based query disk file.

Known Causes

A. when the table is configured to use "transaction mode" zero (0) in the sbd.sbconf and the server is forcefully shut down without using "sbadmin shutdown".

Example configuration which can lead to this error:
<server>
  <param name="disk-querytable-transaction_mode" value="0"/>
</server>

B. when the server process "sbd-java" has hung and a new instance of the StreamBase application is started using the same disk-based query table.

C. when the hard-drive on which the query table is stored runs out of memory.

Recovery

In all cases, the data cannot be recovered from the disk file. Instead the query table files should be removed and the server restarted with empty query tables. After startup, reload the tables normally from external storage.

The Query Table Data Directory may be specified using:
a. the sbd option --datadir
b. the STREAMBASE_DATA environment variable
c. the sbd.sbconf setting:
<server>
    <param name="datadir" value="/tmp/112233/querytable/last10stocks"/> 
</server>

Find out how the location of the query table disk files are defined for your project, stop any sbd server process that may be using them, remove the files, and restart the sbd server again.