Forum Stats

  • 3,769,993 Users
  • 2,253,045 Discussions
  • 7,875,263 Comments

Discussions

Is there any workaround for log LNs in read-only env. UNEXPECTED_STATE

1072560
1072560 Member Posts: 15
edited Apr 1, 2014 9:42AM in Berkeley DB Java Edition

I'm at 5.0.43 and encounter the same problem mentioned in The Berkeley DB Java Edition Package: BDB JE Library Version  11.2.5.0 (Release 5.0.55) Change Log

Fixed a bug that caused an exception such as the following, when opening an Environment in read-only mode. This occurred under certain circumstances when a clean shutdown (final checkpoint) was not performed when the Environment was last used by a read-write process.


I have below 2 questions:


1) I want to know if there's any workaround to this problem without having to upgrade BDB-JE.


2) Just want to make sure we will not have data compatible issue if we have to upgrade to the latest version


Thanks for your help.

Best Answer

  • Greybird-Oracle
    Greybird-Oracle Member Posts: 2,690
    Accepted Answer

    This is a transient problem when opening in read-only mode.  It does not cause corruption or a compatibility issue.

    If you open the environment read-write and perform a normal shutdown (Environment.close), then it should be possible to open the environment read-only again.

    However, it is possible that it could happen again if the read-write process exits without calling Environment.close.  The only way to guarantee it won't happen again is to always call Environment.close in the read-write process before opening it read-only, or upgrade to the latest version of JE 5.

    --mark

Answers

  • Greybird-Oracle
    Greybird-Oracle Member Posts: 2,690
    Accepted Answer

    This is a transient problem when opening in read-only mode.  It does not cause corruption or a compatibility issue.

    If you open the environment read-write and perform a normal shutdown (Environment.close), then it should be possible to open the environment read-only again.

    However, it is possible that it could happen again if the read-write process exits without calling Environment.close.  The only way to guarantee it won't happen again is to always call Environment.close in the read-write process before opening it read-only, or upgrade to the latest version of JE 5.

    --mark

This discussion has been closed.