O7: Duplicate keys and segment issues in a native datafile

Geir Fjærli omnis at sunshinedata.com
Thu May 29 08:23:24 EDT 2008


Apologies for a long post, but I want to describe the circumstances for this
issue as well as possible.

An Omnis 7 installation seems to be having problems: This is Omnis 7.3.7.1.1
with native datafiles. There us a user database that holds the path to the
project database for each user, and the project datafile then holds orders
and activities and more.

They have an "order" file format with both a sequence number and an
application generated unique key that serves as an order number. Lately they
have seen a handful orders where the unique key is the same on more than one
order, and in one case even with the sequence number being duplicated too.
They are not the same orders, though, they just have gotten the same order
number.

The application is in use at several other customers and sites - some with
considerably larger transaction volumes - which does not exhibit these
problems, so bugs in the application is unlikely. (I didn't write it, but it
looks foolproof enough and have been working for years.)

This happened when moving from one version of the application to another,
from one server to another, and going from one to two segments on the
datafile. Not sure in which order. Moving to a new version could be an
issue, but the program automatically checks for reorgs and performs them.
This is well tested and frequently performed on other sites too, also with
this version.

One strange thing is that after moving the datafiles to another server, the
date on the second segment hadn't change for weeks, while it has on the
first segment, indicating that Omnis no longer could find the second
segment. But after moving the datafiles back to the original server
yesterday and opening them there the date did change on both segments, and
also the second segment suddenly grew. (There is a routine in the app that
expands the segment on startup if less than x bytes available.) So it really
sounds that it could not find the second segment after the move.

I wonder if the duplicate order numbers could be caused by Omnis not finding
the segment. Though the key generator stores the last used key in a
constants record which would be in segment 1, so that is not entirely
plausible.

So they have a few questions:

1. When moving the datafiles from one location to another, how does Omnis
know where the second segment is? Is there something you must do to update
the segment table (or wherever the information is stored) when moving a
database like that?

2. They are referring to the datafile using UNC paths rather than computer
names. Can this cause problems with multiple segments, especially when
relocating the datafile?

3. They are using a backup program called Shadow copy. I have told them that
backups of open Omnis files is not a good idea. Does anyone know this
particular program and care to comment? Though I have not verified this,
there might have been a backup restore at some time.

4. It is of course entirely possible that the new server has Opportunistic
Locking etc turned on. Which would be a bad thing. But could that cause
users to get duplicated values back?

All and any comments and ideas are welcome.

TIA,

Geir :)




More information about the omnisdev-en mailing list