support works as follows:
<ul>
- <li> <p>Clients executing "BEGIN READONLY" transactions are not assigned
- a <client-id>. Instead, they have a transaction-id that is unique
- within the lifetime of the process. Transaction-ids are assigned using a
- monotonically increasing function.
<li> <p>In single-process mode, writers never spill the cache mid-transaction.
Data is only written to the database as part of committing a transaction.
containing the original data for each page overwritten by the current
transaction in main-memory.
- <li> <p>When a transaction is to be committed, a writer first obtains a
- transaction-id (in the same way as a BEGIN READONLY client) and then adds
- all of its "old data" buffers to a hash table accessible to all database
- clients. Associated with each hash table entry is the newly assigned
- transaction-id. It then waits (spin-locks) for all "BEGIN READONLY"
- read-locks to clear on all pages that will be written out by the
- transaction. Following this, it commits the transaction as normal (writes
- out the dirty pages and zeroes the journal file header).
+ <li> <p>When a transaction is ready to be committed, a writer obtains a
+ transaction-id. Transaction-ids are assigned to writers using a
+ monotonically increasing function. The writer then adds all of its "old
+ data" buffers to a hash table accessible to all database clients.
+ Associated with each hash table entry is the newly assigned transaction-id.
+ It then waits (spin-locks) for all "BEGIN READONLY" read-locks to clear on
+ all pages that will be written out by the transaction. Following this, it
+ commits the transaction as normal (writes out the dirty pages and zeroes
+ the journal file header).
+
+ <li> <p>Clients executing "BEGIN READONLY" transactions are not assigned
+ a <client-id>. Instead, they are assigned a transaction-id that is
+ either (a) that of the oldest transaction-id belonging to a writer that has
+ not yet finished committing, or (b) if there are currently no writers
+ committing then the value that will be assigned to the next committer.
<li> <p>When a "BEGIN READONLY" transaction reads a page, it first checks
the aforementioned hash table for a suitable entry. A suitable entry
- is one with the right page-number and a transaction-id greater than that
- of the "BEGIN READONLY" transaction (i.e. one added to the hash table
- <i>after</i> the BEGIN READONLY transaction started). If such an entry
- can be found, the client uses the associated data instead of reading
- from the db file. Or, if no such entry is found, the client:
+ is one with the right page-number and a transaction-id greater than or
+ equal to that of the "BEGIN READONLY" transaction (i.e. one that had not
+ finished committing when the BEGIN READONLY transaction started). If such
+ an entry can be found, the client uses the associated data instead of
+ reading from the db file. Or, if no such entry is found, the client:
<ol>
<li> Increments the number of BEGIN READONLY read-locks on the page.
<li> Reads the contents of the page from the database file.
-C Update\sand\sadd\sfurther\sdetail\sto\sREADME-server-edition.html.
-D 2018-03-30T20:42:25.654
+C Fix\san\serror\sin\sREADME-server-edition.html.
+D 2018-03-31T18:43:20.756
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F Makefile.in 7016fc56c6b9bfe5daac4f34be8be38d8c0b5fab79ccbfb764d3b23bf1c6fff3
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
F Makefile.msc bdcad21b027a56a73e54a1121cfb9edd0a35c0abfa53aa12c2f996006ff99960
-F README-server-edition.html 2065bc7f89b84ec9e4199aeae3786399a3bb88cd8ed3f7398067d010d7c4cf8b
+F README-server-edition.html b98409c486d6f02871b20a9e29e1e18cd050a02e03062569ffb051774b4d6861
F README.md 1d5342ebda97420f114283e604e5fe99b0da939d63b76d492eabbaae23488276
F VERSION cdf91ac446255ecf3d8f6d8c3ee40d64123235ae5b3cef29d344e61b45ec3759
F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P df52e89fff54dbb650cd1fb2b7afe0467acea96a0056728ef48e0c3fea40eeb2
-R 7d4ea8fb7a75fedab49e62a0da9de0ed
+P 337a0b67e30f1030fdc59f712e5914f4801b0e9e4ae19a1e82c10b73eb3f4773
+R 5045a1c8302fea1a74fa92a9ce0972dd
U dan
-Z c5379dcb0a548050240d2cfa8c04d0d8
+Z d3c495daa23a1fc63d551424dd8817b7