Re: swap file number

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sun, 30 Mar 2003 10:21:43 +0200

Chengdu Huang wrote:

> storeUnlockObject may trigger storeRelease.

Yes.

> This only remove the file with file number e->swap_file_number. How
> about the old swap files?

All swap files have a StoreEntry associated with them.

When there is clients accessing a StoreEntry it is locked, preventing it
(and the associated swap file) from being deleted by
storeReleaseRequest().

When the last lock of the StoreEntry is removed and it has been
requested that the entry should be deleted StoreRelease() is called,
which deletes both the StoreEntry and the on-disk swap file.

When a existing object is replaced by a new version, it is requested
that the old copy should be released by a call to
storeReleaseRequest(). If the old object is locked this moves the old
StoreEntry to a unique private key making sure no new clients will find
this StoreEntry and flags the StoreEntry for delete. The flag is later
used by storeUnlock() as you found.

Regards
Henrik
Received on Sun Mar 30 2003 - 02:19:25 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:35 MST