"Florent Lejeune" <[EMAIL PROTECTED]> writes:

>Hi
>
>We use Metakit to store miscellaneous information for our programe. It works 
>on windows, 
>macosx and linux.
>It happens that when the database is created on the windows network, we have 
>some problem 
>with the windows application (we use metakit-2.4.9.6).
>
>Below you will find a program that creates a file, adds rows, and retrieves 
>information.
>
>The Find function doesn't return anything and a manuel search also gives no 
>result. In our 
>main program, the Find() function remains in an infinite loop.
>It works fine with other plateform combinations : from windows client to 
>simple windows 
>sharing, from macosx client to windows file server and from macosx client to 
>macosx apple share 
>file server.
>
>Thanks for any suggestion about this.

You don't say what kind of problem you have with the network files but
I will make a guess that it sometimes produces corrupt metakit
databases. Metakit works by mapping the file into memory as a
read-only memory mapped file and when it saves any changes it
serializes the in-memory version to the file, unmaps and re-maps the
database. We found that when the file is on a network share the re-map
step doesn't re-map the new file, but instead maps the old image and
breaks everything.

The simplest solution I found was to ensure that if the file is mapped
to a network share that we open the windows file for exclusive
access. There are likely some longer posts about my bug hunt in the
archive for this list if this is relevant.

-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD

_____________________________________________
Metakit mailing list  -  Metakit@equi4.com
http://www.equi4.com/mailman/listinfo/metakit

Reply via email to