[svnbook] r5868 committed - branches/1.8/zh/book/ch08-embedding-svn.xml

wuzhouhui at users.sourceforge.net wuzhouhui at users.sourceforge.net
Sat Jan 26 21:55:30 CST 2019


Revision: 5868
          http://sourceforge.net/p/svnbook/source/5868
Author:   wuzhouhui
Date:     2019-01-27 03:55:21 +0000 (Sun, 27 Jan 2019)
Log Message:
-----------
1.8/zh: translation of chapter 8 in progress

Modified Paths:
--------------
    branches/1.8/zh/book/ch08-embedding-svn.xml

Modified: branches/1.8/zh/book/ch08-embedding-svn.xml
===================================================================
--- branches/1.8/zh/book/ch08-embedding-svn.xml	2019-01-26 03:24:17 UTC (rev 5867)
+++ branches/1.8/zh/book/ch08-embedding-svn.xml	2019-01-27 03:55:21 UTC (rev 5868)
@@ -430,11 +430,16 @@
         快照.</para>
 
       <sidebar>
+      <!--
         <title>The Transaction Distraction</title>
+      -->
+        <title>两种事务</title>
 
+      <!--
         <para>The notion of a Subversion transaction can become easily
           confused with the transaction support provided by the
           underlying database itself, especially given the former's
+          ### TODO
           close proximity to the Berkeley DB database code in
           <filename>libsvn_fs_base</filename>.  Both types of
           transaction exist to provide atomicity and isolation.  In
@@ -444,7 +449,13 @@
           get treated as though <emphasis>none</emphasis> of them ever
           happened—and in a way that does not interfere with
           other processes acting on the data.</para>
+      -->
+        <para>用户很容易把 Subversion 的事务与后端数据库所提供的事务支持弄混.
+          这两种事务都用于提供原子性和隔离性, 换句话说, 事务允许用户以这样一
+          种方式执行一个操作集合—要么集合中的所有操作都执行成功, 要么一
+          个都不执行—同时不会干扰到操作数据的其他进程.</para>
 
+      <!--
         <para>Database transactions generally encompass small
           operations related specifically to the modification of data
           in the database itself (such as changing the contents of a
@@ -458,7 +469,15 @@
           creation of a Subversion transaction fails, the database will
           look as though we had never attempted that creation in the first
           place)!</para>
+      -->
+        <para>数据库事务所围绕的操作通常与修改数据库的数据有关 (例如修改表的一
+          行), 而 Subversion 事务所涵盖的范围更大, 层次也更高, 例如针对文件或
+          目录集合的修改, 这些修改将作为一个新的版本号存放到文件系统中. 如果
+          读者的思路还跟得上, 再考虑这样一个事实—Subversion 是在一个数据
+          库事务中完成 Subversion 事务的创建 (如果 Subversion 事务创建失败,
+          那么数据库看起来就像是从来没有创建过 Subversion 事务).</para>
 
+      <!--
         <para>Fortunately for users of the filesystem API, the
           transaction support provided by the database system itself
           is hidden almost entirely from view (as should be expected
@@ -466,6 +485,10 @@
           when you start digging into the implementation of the
           filesystem itself that such things become visible (or
           interesting).</para>
+      -->
+        <para>幸运的是对于文件系统 API 用户而言, 由数据库所提供的事务支持几乎
+          是不可见的 (对于模块化的函数库而言, 这应该是人们所期待的效果), 只
+          有当人们想知道文件系统的实现细节时, 数据库事务才变成可见的.</para>
 
       </sidebar>
 




More information about the svnbook-dev mailing list