durusmail: durus-users: A question
A question
2006-06-19
2006-06-19
A question
David Binger
2006-06-19
On Jun 19, 2006, at 3:56 PM, Iordan Hristov wrote:

> Hi,
>
> I have been trying out the simple examples for Durus and I run into
> the following problem.
>
> in Window 1:
> run a durus server with: durus -s
>
> in Window 2:
> run a client with: durus -c
> make an assignment and commit:
> root['a']=range(5)
> connection.commit()
>
> in Window 3:
> run a client with: durus -c
> root['a'] correctly gives: [0, 1, 2, 3, 4]
> but when I make a new assignment here and commit it is not
> accessible in window 2:
> root['b']=range(10)
> connection.commit()
>
> in Window 2:
> >>> root['b']
> Traceback (most recent call last):
>   File "", line 1, in ?
>   File "build/bdist.darwin-8.6.0-Power_Macintosh/egg/durus/
> persistent_dict.py", line 29, in __getitem__
> KeyError: 'b'

Do connection.abort() in Window2,
then it will see the changes.
The root that it is holding needs to be invalidated, and that
won't happen until the Window2 client calls commit() or abort().


reply