Hi Giovanni, that is not the expected behavior. Are you certain session1 and session2 are really two different sessions?
Let's work from a complete script and see if we can find where we diverge. This worked for me, how about for you?
| path session1 session2 | path := 'c:\temp\localCommitTest'. MagmaRepositoryController create: path root: Dictionary new. session1 := MagmaSession openLocal: path. session1 connectAs: 'session1'. session2 := MagmaSession openLocal: path. session2 connectAs: 'session2'. [ session1 begin. session1 root at: #foo put: #bar. session2 commit: [session2 root at: #foo put: #baz]. [ session1 commit ] on: MagmaCommitError do: [ : err | err result explore ] ]
ensure: [ session1 disconnect. session2 disconnect. session2 closeRepository ]
--- Giovanni Corriga giovanni@corriga.net wrote:
Hi all,
the following snippet
session1 begin. session1 root at: #foo put: #bar. session2 commit: [session2 root at: #foo put: #baz]. session1 commit.
results in a MagmaCommitError, as it should, when the sessions are remote and created with #hostAddress:port: , but runs successfully when the two sessions are created using #openLocal: .
Is this expected, or is it a bug?
Ciao,
Giovanni