History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: SES-477
Type: New Feature New Feature
Status: Closed Closed
Resolution: Won't Fix
Priority: Minor Minor
Assignee: Arjohn Kampman
Reporter: Max Völkel
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Sesame

connection.commit() should call sync() on a MemoryStore in the sail stack, if there is one

Created: 14/Nov/07 01:29 PM   Updated: 30/Jun/08 05:42 PM
Component/s: Memory Sail
Affects Version/s: 2.0-rc1
Fix Version/s: None


 Description   
If this does not break the exact semantics of commit(), being sure that changes are persisted would be nice.

 All   Comments   Change History      Sort Order:
Comment by Arjohn Kampman [15/Nov/07 01:33 PM]
Scheduled for investigation in rc2. From the top of my head, MemoryStoreConnection.commit() should already call sync() and, depending on the configured sync delay, synchronize the changes to disk.

Comment by Arjohn Kampman [16/Nov/07 08:46 PM]
Max, I don't exactly understand this feature request. Isn't this behaviour already covered by setting the syncDelay parameter to 0?

Comment by Arjohn Kampman [23/Nov/07 01:41 PM]
Rescheduling to a future release as the request is unclear.

Comment by Max Völkel [26/Nov/07 02:20 PM]
I would like that commit() *immediately* does internally a commit() followed by a sync(). So that after commit() I can be sure my changes are on disk.

Comment by Arjohn Kampman [14/Dec/07 12:19 PM]
The requested behaviour is already available, just make sure that the syncDelay parameter of the MemoryStore is equal to 0 (which is the default).

Comment by Max Völkel [14/Dec/07 01:52 PM]
Hmm, let's try to be more clear. A MemoryStore is great, because its so much faster than a persisten store. However, it would be ideal to be able to control the sync-time point. Even automatically writing on disk costs too much performance. What I would like is:
- MemoryStore *never* writes automatically to a backend
- *unless* sync() or committ() is called explicitly.

As far as I understood, syncDelay=0 would write to backend after each transaction.

Comment by Arjohn Kampman [14/Dec/07 01:58 PM]
You can set the syncDelay parameter to a negative value to disable the sync upon commit. The MemoryStore will then only sync to disk when it is shut down, or when sync() is explicitly called.

Comment by Max Völkel [16/Dec/07 04:14 PM]
Almost perfect. How can I call sync() when the MemoryStore is hidden deep in a stack of sails? Is there any other way than traversing the sails by hand, until I found a MemoryStore? What are the semantics of calling commit() at a higher sail? Will it implicitly call sync() on the MemoryStore?