Linux – Subversion – What is the purpose of txn-protorevs

linuxsvn

I have a Subversion server and into one of the Subversion repositories, I got this directory under the db directory:

txn-protorevs

which contains the following files for me

119M    1-4.rev
0       1-4.rev-lock

What is the purpose of this directory inside an SVN repository?

Best Answer

If you want to understand the db directory, you should probably read through the source code which SVN uses to implement FSFS, which has comments that go into extensive detail of how the pieces fit together. In brief, here is what the files are

txn-protorevs/      Subdirectory containing transaction proto-revision files
    <txnid>.rev       Proto-revision file for transaction <txnid>
    <txnid>.rev-lock  Write lock for proto-rev file

And here is what a proto-revision file does

The prototype rev file is used to store the text representations as they are received from the client. To ensure that only one client is writing to the file at a given time, the "rev-lock" file is locked for the duration of each write.