List Info

Thread: Atomicity of SVNRepository's methods / SVNCommitEditor




Atomicity of SVNRepository's methods / SVNCommitEditor
user name
2007-04-19 13:27:39
Hi,

I wonder if the methods of SVNRepository (like .checkout an
.update) are 
atomic: Is it possible (not probable) that another SVN
client commit 
changes just while (not before or after) I am checking out
or updating 
through these methods ?

I am also concerned about the use of the SVNCommitEditor
object: 
In case of heavy editing through calls of the editor's
methods it is 
possible, that another SVN client took a commit meanwhile.
Does this cause 
trouble for the editor itself? I think a final (and atomic)
commit is done 
by the editor through the call of its .closeEdit() method,
not during the 
editing, or isn't it? To which revision does this refer, the
HEAD revision 
at initialization of the editor or the HEAD revision at the
.closeEdit() 
call?


Fabian Kiss

------------------------------------------------------------
---------
To unsubscribe, e-mail: svnkit-users-unsubscribesvnkit.com
For additional commands, e-mail: svnkit-users-helpsvnkit.com


RE: Atomicity of SVNRepository's methods / SVNCommitEditor
user name
2007-04-19 14:24:06
I don't know what SVNKit's functionality is for sure but I
believe in
the case of the SVN client what happens if two people try to
commit is
that one commits and the other gets knocked out because your
repository
has to be "up to date" before you can commit.

The documentation isn't very clear, but if I had to guess I
would guess
that everything would go as planned until you tried to call
closeEdit,
then it would throw an exception and cancel the whole
transaction (as if
abortEdit was called). I guess this because that is the
closest to how
I've observed the real client to behave.

Alex Kitaev probably could respond with absolute certainty,
but you
might be able to test this yourself by running two SVN
commit actions.
You could use the commit example already given, but then
rather than
calling closeEdit, open up a new connection and do a commit
there, then
go back to the original code and call closeEdit and see what
happens.

Jason

-----Original Message-----
From: kissinformatik.uni-freiburg.de
[mailto:kissinformatik.uni-freiburg.de] 
Sent: Thursday, April 19, 2007 2:28 PM
To: svnkit-userssvnkit.com
Subject: Atomicity of SVNRepository's methods /
SVNCommitEditor

Hi,

I wonder if the methods of SVNRepository (like .checkout an
.update) are

atomic: Is it possible (not probable) that another SVN
client commit 
changes just while (not before or after) I am checking out
or updating 
through these methods ?

I am also concerned about the use of the SVNCommitEditor
object: 
In case of heavy editing through calls of the editor's
methods it is 
possible, that another SVN client took a commit meanwhile.
Does this
cause 
trouble for the editor itself? I think a final (and atomic)
commit is
done 
by the editor through the call of its .closeEdit() method,
not during
the 
editing, or isn't it? To which revision does this refer, the
HEAD
revision 
at initialization of the editor or the HEAD revision at the
.closeEdit()

call?


Fabian Kiss

------------------------------------------------------------
---------
To unsubscribe, e-mail: svnkit-users-unsubscribesvnkit.com
For additional commands, e-mail: svnkit-users-helpsvnkit.com


------------------------------------------------------------
---------
To unsubscribe, e-mail: svnkit-users-unsubscribesvnkit.com
For additional commands, e-mail: svnkit-users-helpsvnkit.com


Re: Atomicity of SVNRepository's methods / SVNCommitEditor
user name
2007-04-20 00:36:34
Hello Fabian,

 > I wonder if the methods of SVNRepository (like
.checkout an .update) are
 > atomic: Is it possible (not probable) that another SVN
client commit
 > changes just while (not before or after) I am checking
out or updating
 > through these methods ?

SVNKit commit operations are atomic. That means that if you
have two or 
more different clients committing (no matter whether they
are all SVNKit 
clients or only one of them), they will be synchronized on
the back end. 
In case of svn:// and http:// protocols commit finalizations
are handled 
by the server itself (svnserve or mod_dav_svn), SVNKit
client only sends 
  necessary data and commands to the server, but the final
step - 
writing to the repository - is undertaken by the server as
you call 
ISVNEditor.closeEdit(). In case of the file:/// protocol
SVNKit behaves 
like Subversion - it gets a write lock on a repository
before making a 
transaction immutable the same way Subversion does it.

When updating via svn:// or http://svnkit.com/ - Java
[Sub]Versioning Library!

kissinformatik.uni-freiburg.de wrote:
> Hi,
> 
> I wonder if the methods of SVNRepository (like
.checkout an .update) are 
> atomic: Is it possible (not probable) that another SVN
client commit 
> changes just while (not before or after) I am checking
out or updating 
> through these methods ?
> 
> I am also concerned about the use of the
SVNCommitEditor object: In case 
> of heavy editing through calls of the editor's methods
it is possible, 
> that another SVN client took a commit meanwhile. Does
this cause trouble 
> for the editor itself? I think a final (and atomic)
commit is done by 
> the editor through the call of its .closeEdit() method,
not during the 
> editing, or isn't it? To which revision does this
refer, the HEAD 
> revision at initialization of the editor or the HEAD
revision at the 
> .closeEdit() call?
> 
> 
> Fabian Kiss
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: svnkit-users-unsubscribesvnkit.com
> For additional commands, e-mail: svnkit-users-helpsvnkit.com
> 
> 
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: svnkit-users-unsubscribesvnkit.com
For additional commands, e-mail: svnkit-users-helpsvnkit.com


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )