Merge lp:~pbeaman/akiban-persistit/release-3.1.7-prep into lp:akiban-persistit

Proposed by Peter Beaman
Status: Merged
Approved by: Peter Beaman
Approved revision: 368
Merged at revision: 365
Proposed branch: lp:~pbeaman/akiban-persistit/release-3.1.7-prep
Merge into: lp:akiban-persistit
Diff against target: 775 lines (+368/-209)
11 files modified
doc/BugList (+145/-0)
doc/Configuration.rst (+20/-3)
doc/ReleaseNotes.rst (+63/-188)
doc/build/src/SphinxDocPrep.java (+127/-3)
src/main/java/com/persistit/IntegrityCheck.java (+2/-2)
src/main/java/com/persistit/JournalManager.java (+0/-1)
src/main/java/com/persistit/JournalManagerBench.java (+4/-4)
src/main/java/com/persistit/Persistit.java (+1/-1)
src/test/java/com/persistit/Bug1041293Test.java (+1/-1)
src/test/java/com/persistit/TrackingFileChannel.java (+3/-4)
src/test/java/com/persistit/stress/unit/CommitBench.java (+2/-2)
To merge this branch: bzr merge lp:~pbeaman/akiban-persistit/release-3.1.7-prep
Reviewer Review Type Date Requested Status
Peter Beaman Approve
Review via email: mp+123836@code.launchpad.net

Description of the change

Updated release notes:
- reformatted to be more concise and readable
- added new bugs and changes for version 3.1.7.
- added code in documentation preparation classes to create the bug list table

Applied code-cleanup rules (mostly adding "final" to a number of declarations) for consistency.

LBJ: NO_BUILD

To post a comment you must log in.
367. By Peter Beaman

Typo in SphinxDocPrep.java

368. By Peter Beaman

Add the BugList file

Revision history for this message
Peter Beaman (pbeaman) wrote :

Self-approving because there are no code changes (other than cosmetic changes) and Nathan is unavailable to review.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'doc/BugList'
--- doc/BugList 1970-01-01 00:00:00 +0000
+++ doc/BugList 2012-09-11 21:38:18 +0000
@@ -0,0 +1,145 @@
11044513 : 3.1.7
2
3`AssertionError in IntegrityCheckTest`
4
5A bug in unit test code caused spurious assertion errors.
6
71044397 : 3.1.7
8
9`IntegrityCheck throws ArrayIndexOutOfBoundsException`
10
11IntegrityCheck and the CLI ``pview`` command were not immune to
12certain inconsistent byte patterns in a corrupt page, making them
13inadequate for diagnosing a severely corrupted database.
14
151041293 : 3.1.7
16
17`Mismatched buffer pool sizes and volume page size results in NPE`
18
19Attempting to open a Volume with a valid page size S resulted in a
20NullPointerException if there was no buffer pool having page size
21S specified. This same condition how throws an IllegalStateException.
22
231043536 : 3.1.7
24
25`Build fails: persistit-coverage hangs with deadlock`
26
27A bug in a unit test left a deadlock condition under certain race
28conditions. Speed variations caused by clover instrumentation
29triggered frequent occurrences.
30
311036422 : 3.1.6
32
33`CommitPolicy HARD can soak CPU`
34
35With CommitPolicy HARD we observed a CPU-soaking loop in the commit
36logic.
37
381032701 : 3.1.5
39
40`Interrupt causes Thread to exit without releasing claims`
41
42If a thread was interrupted at an inopportune time (for example,
43by query cancellation in Akiban Server), a page in the buffer pool
44could be left in a locked state blocking all further progress. The
45only remedy was to stop and restart the JVM.
46
471028016 : 3.1.4
48
49`Old Journal Files Not Being Deleted`
50
51If a volume was removed from the configuration and Persistit was
52then restarted, the associated journal files would not be removed
53due to internal safety checks. To support intentional removal of a
54volume, a new configuration option was added.
55
56See the ``Detecting and Ignoring Missing Volumes`` feature description
57for more details.
58
59
601024857,1026207 : 3.1.4
61
62`Class Index Updates Causing Write-Write Dependencies`
63
64Custom classes that are serialized into keys or values through a
65custom KeyCoder or ValueCoder are given a unique identifier. The
66identifier was determined within an application transaction the
67first time a class was written and stored in an internal tree. This
68would cause seemingly spurious aborts if multiple application threads
69simultaneously attempted to store the first instance of a given
70class. The identifier is now committed within an independent
71transaction.
72
731028050,1028134 : 3.1.4
74
75`Accumulator Memory Usage and Transaction Step Policy`
76
77Each individual change to an Accumulator was previously stored as
78an individual Delta object. For long running transactions that
79heavily utilized Accumulators, this would cause excessive memory
80usage. These unique instances are now eliminated in most scenarios,
81resulting in stable memory utilization in all but pathological
82cases.
83
84Additionally, the Accumulator handling of the Transaction step value
85was inconsistent with how it was treated through an Exchange. Now,
86both classes allow a transaction at a given step N to see any update
87created by that transaction at a step less N.
88
89
901005206 : 3.1.2
91
92`Infinite Loop When Repacking Buffer`
93
94This could occur if a buffer required restructuring during pruning
95of a long value that was previously stored under a transaction.
96Upon the next save of this buffer to disk (e.g. shutdown), an
97infinite loop would occur.
98
99
1001010079 : 3.1.2
101
102`Corruption Exceptions During Various Operations`
103
104NOTE: Only the message indicates a database corruption. The data
105volume is actually correct and intact.
106
107This could occur if pruning a buffer containing a long record
108previously stored under a transaction required removal of keys and
109then that buffer was reused without further modification. A parallel
110structure associated with the every Buffer, the FastIndex, was not
111maintained during this operation.
112
1131012856 : 3.1.2
114
115`Slow Accumulator Operations`
116
117If a thread starting a new transaction was interrupted during the
118call to begin(), there was a chance for an internal object to wind
119up in an invalid state. This invalid state caused no visible
120consequences other than slower than expected Accumulator actions
121if this had occurred many times.
122
123
1241017957 : 3.1.2
125
126`B+Tree Corruption in Stress Test`
127
128An extremely rare combination of events corrupted memory structures
129causing an incorrect key-pointer pair to be inserted while deleting
130records in a key range. The bug was detected in an 8-hour stress
131test run.
132
1331018526 : 3.1.2
134
135`Very long recovery time due to many temporary tree IT records`
136
137Every Tree created in a temporary volume was being assigned a tree
138handle recorded permanently in the journal. In one case the result
139was a journal containing millions of IT (Identify Tree) records,
140and these caused normal recovery to take a very long time. The fix
141keeps temporary trees out of the journal and removes IT records
142which may have been added previously.
143
144
145
0146
=== modified file 'doc/Configuration.rst'
--- doc/Configuration.rst 2012-08-23 21:10:56 +0000
+++ doc/Configuration.rst 2012-09-11 21:38:18 +0000
@@ -185,7 +185,24 @@
185185
186The journal is written by appending records to the end of the highest-numbered file. Read operations occur while copying page images from the journal to their home volume files. While copying, Persistit attempts to perform large sequential read operations from the journal. Read operations also occur at random when Persistit needs to reload the image of a previously evicted page.186The journal is written by appending records to the end of the highest-numbered file. Read operations occur while copying page images from the journal to their home volume files. While copying, Persistit attempts to perform large sequential read operations from the journal. Read operations also occur at random when Persistit needs to reload the image of a previously evicted page.
187187
188Because of these characteristics a modern SSD (solid disk drive) is ideally suited for maintaining the journal. If no SSD is available in the server, placing the journal on a different physical disk drive than the volume file(s) can significantly improve performance.188Because of these characteristics a modern enterprise SSD (solid disk drive) is ideally suited for maintaining the journal. If no SSD is available in the server, placing the journal on a different physical disk drive than the volume file(s) can significantly improve performance.
189
190However, beware of consumer-grade SSDs. Some may cache writes and record them on non-volatile storage much later. In a power failure event, committed transactions recorded only in the write cache can be lost. The durability of committed transactions can only be guaranteed if the hardware stack cooperates in making sure all writes are durable.
191
192Buffer Pool Preload
193-------------------
194
195Persistit includes an optional facility to record periodically an inventory of pages in the buffer pool. When Persistit starts up it attempts to re-read the same pages that were previously in the buffer pool so that performance after restart on a similar workload (e.g., queries that exhibit a moderate or strong degree of locality-of-reference) will run at full speed. This facility can be especially important in large buffer pool configurations in which under normal workloads a server may otherwise require minutes to hours to reach optimal speed due to a large number of random reads. Re-reading the inventory at startup can be much faster since pages are read in approximate physical order.
196
197This facility is controlled by two configuration parameters:
198
199- ``com.persistit.Configuration#setBufferInventoryEnabled`` controls whether Persistit records the inventory. If enabled, the recording happens once per Checkpoint and once at normal shutdown. The inventory is stored in the system volume.
200
201- ``com.persistit.Configuration#setBufferPreloadEnabled`` controls whether Persistit attempts to preload the buffer pool during startup. If there is a recorded inventory Persistit attempts to re-read the pages that were previously present; otherwise it silently continues the startup.
202
203If upon restart the buffer pool has become smaller so that the inventory is larger than the current buffer pool, Persistit only loads as many pages as there currently are buffers.
204
205Although by default these configuration properties are false, we recommend enabling them for production servers because the inventory process takes very little time, and buffer preload can restore the buffer pool to a useful working set orders of magnitude faster than warming it up through normal load.
189206
190Other Configuration Parameters207Other Configuration Parameters
191------------------------------208------------------------------
@@ -232,14 +249,14 @@
232 only when no adapter has been installed.249 only when no adapter has been installed.
233250
234 ``bufferinventory``: (``com.persistit.Configuration#setBufferInventoryEnabled``), True or False (default).251 ``bufferinventory``: (``com.persistit.Configuration#setBufferInventoryEnabled``), True or False (default).
235 If true, Persistit periodically records an inventory of all the buffes in the buffers pools to the System Volume. The inventory252 If true, Persistit periodically records an inventory of all the pages in the buffers pools to the System Volume. The inventory
236 enables Persistit to preload the buffer pools then next time it starts up with approximately the same pages that were present253 enables Persistit to preload the buffer pools then next time it starts up with approximately the same pages that were present
237 before shutdown. To enable buffer preloading, the bufferpreload property must also be true.254 before shutdown. To enable buffer preloading, the bufferpreload property must also be true.
238 255
239 ``bufferpreload``: (``com.persistit.Configuration#setBufferPreloadEnabled``), True or False (default).256 ``bufferpreload``: (``com.persistit.Configuration#setBufferPreloadEnabled``), True or False (default).
240 If true, and if a buffer pool inventory was previously recorded, Persistit attempts to "warm up" the buffer pool257 If true, and if a buffer pool inventory was previously recorded, Persistit attempts to "warm up" the buffer pool
241 by preloading pages that were present in the buffer pool when Persistit last shut down. This may allow a freshly started258 by preloading pages that were present in the buffer pool when Persistit last shut down. This may allow a freshly started
242 Persistit instance to begin service a workload similar to what it had previously been processing without incurring the259 Persistit instance to begin servicing a workload similar to what it had previously been handling without incurring the
243 cost of many random disk reads to load pages.260 cost of many random disk reads to load pages.
244 261
245262
246263
=== modified file 'doc/ReleaseNotes.rst'
--- doc/ReleaseNotes.rst 2012-08-24 18:16:21 +0000
+++ doc/ReleaseNotes.rst 2012-09-11 21:38:18 +0000
@@ -44,207 +44,81 @@
44|44|
45|45|
4646
4747Version History
48************************************48===============
493.1.649
50************************************50+---------+--------------------+--------------------------------------------------------------------------+
5151| Version | Release Date | Summary |
52Release Date52+=========+====================+==========================================================================+
53============53| 3.1.7 | September 11, 2012 | Fix several bugs, add buffer pool preload ("warm-up"), |
54August 24, 201254| | | reformat code base |
5555+---------+--------------------+--------------------------------------------------------------------------+
56Overview56| 3.1.6 | August 24, 2012 | Fix bug 1036422 |
57========57+---------+--------------------+--------------------------------------------------------------------------+
58This version of Persistit fixes one bug.58| 3.1.5 | August 6, 2012 | Fix bug 1032701, modify pom.xml for Eclipse Juno |
5959+---------+--------------------+--------------------------------------------------------------------------+
60Fixed Issues60| 3.1.4 | August 3, 2012 | License changed to Eclipse Public License, various other enhancements |
61============61+---------+--------------------+--------------------------------------------------------------------------+
6262| 3.1.2 | July 13, 2012 | Fix several bugs |
63https://bugs.launchpad.net/akiban-persistit/+bug/103642263+---------+--------------------+--------------------------------------------------------------------------+
6464| 3.1.1 | May 31, 2012 | First open source release of Akiban Persistit |
65With CommitPolicy HARD we observed a CPU-soaking loop in the commit logic.65+---------+--------------------+--------------------------------------------------------------------------+
6666
67************************************67
683.1.568Resolved Issues
69************************************69===============
7070
71Release Date71{{bug-list}}
72============72
73August 6, 201273Changes and New Features
7474========================
75Overview75
76========76Persistit 3.1.7 - Code Base Reformatted
77This version of Persistit changes the pom.xml to a form compatible with the Maven central repository and includes one bug fix.77---------------------------------------
7878
79Fixed Issue79To simplify diffs and improve legibility, the entire code base was reformatted and "cleaned up" by the Eclipse code formatting tool. The maven build now automatically formats all
80===========80source to ensure coherent diffs in the future. The settings for formatting and code style cleanup by Eclipse are found in the ``src/etc`` directory.
8181
82https://launchpad.net/akiban-persistit/+bug/103270182Persistit 3.1.7 - Buffer Pool Preload
8383-------------------------------------
84If a thread was interrupted at an inopportune time (for example, by query cancellation in Akiban Server), a page in the buffer pool could be left in a locked state blocking all further progress. The only remedy was to stop and restart the JVM.84
8585On a server with a large buffer pool (many gigabytes), a Persistit instance can run for a long time before the buffer pool becomes populated with a suitable working set of database pages. Until then performance is degraded due to a potentially large number of random reads. For a production server the result may be poor performance for minutes to hours after restart.
86|86
87|87The preload facility periodically records an inventory of the pages currently in the buffer pool(s) and optionally reloads the same set of pages when Persistit is restarted. During the preload process Persistit attempts to read pages in approximate file-address order to accelerate reads. In one of our experiments Persistit preloads a buffer pool with over 800,000 16Kbyte buffers in about a minute, which is orders of magnitude faster than the same process would take with reads performed incrementally at random.
8888
89************************************89Two new configuration properties com.persistit.Configuration#setBufferInventoryEnabled and com.persistit#setBufferPreloadEnabled control this behavior. These settings are turned off by default in version 3.1.7.
903.1.490
91************************************91Persistit 3.1.4 - Detecting and Ignoring Missing Volumes
9292--------------------------------------------------------
93Release Date93
94============94Every time Persistit writes a modified page to disk, it does so first to the journal. During recovery processing, the page images from the journal are analyzed and reinserted into volumes in such a way that all B+Trees are restored to a consistent state. The issue addressed in this change is how Persistit behaves during recovery if it discovers that a volume referred to by a page in the journal no longer exists.
95August 3, 201295
9696Recognizing that under some circumstances an administrator may indeed wish to remove a volume from an existing Database, this change provides a configurable switch to optionally allow pages from missing volumes to be skipped (with logged warning messages) during recovery processing. The switch can be enabled by setting the configuration parameter com.persistit.Configuration#setIgnoreMissingViolumes to true.
97Overview97
98========98
99This version of Persistit changes the licensing to Eclipse Public License (EPL) and includes minor enhancements and bug fixes.99Persistit 3.1.4 - Reduce KeyCoder Serialized Object Size
100100--------------------------------------------------------
101New Features
102============
103
104Detection and Ignoring of Missing Volumes
105-----------------------------------------
106
107Warnings are now issues when a previously existing volume is missing, and an option to allow a system to continue by ignoring pages and transactions in the journal from missing volumes.
108
109Every time Persistit writes a modified page to disk, it does so first to the journal. During recovery processing, the page images from the journal are analyzed and reinserted into volumes in such a way that all B+Trees are restored to a consistent state. The issue addressed in this change is how Persistit behaves during recovery if it discovers that a volume referred to by a page in the journal no longer exists.
110
111Recognizing that under some circumstances an administrator may indeed wish to remove a volume from an existing Database, this change provides a configurable switch to optionally allow pages from missing volumes to be skipped (with logged warning messages) during recovery processing. The switch can be enabled by setting the configuration parameter ignoreMissingVolumes to true, see com.persistit.Configuration#setIgnoreMissingViolumes.
112
113
114Reduce KeyCoder Serialized Object Size
115--------------------------------------
116101
117.. note::102.. note::
118 Any Database containing objects serialized by a custom KeyCoder from a previous version of Persistit is incompatible with this change103 Any Database containing objects serialized by a custom KeyCoder from a previous version of Persistit is incompatible with this change
119104
120Minimize the per-instance overhead for application objects written into Persistit Keys by reducing the size of the internal identifier.105Minimize the per-instance overhead for application objects written into Persistit Keys by reducing the size of the internal identifier.
121106
122Persistit has rich support for serializing standard Java primitive and object types into a Key. Additionally, the KeyCoder class allows for any application level object to also be appended to a Key right next to any other type. This is tagged internally with per-class handles. This change lowers the initial offset to, in many cases, halve the serialized size. 107Persistit has rich support for serializing standard Java primitive and object types into a Key. Additionally, the KeyCoder class allows for any application level object to also be appended to a Key right next to any other type. This is tagged internally with per-class handles. This change lowers the initial offset to reduce and in many cases halve the serialized size.
123108
124Maven POM Changes For Eclipse Juno109Persistit 3.1.4 - Maven POM Changes For Eclipse Juno
125----------------------------------110----------------------------------------------------
126111
127The latest version of Eclipse, code named Juno, features a wide array of changes, including a new release of the m2eclipse plugin. In an effort to make getting started with Persistit as easy as possible, we have included the required m2e configuration sections in our pom.112The latest version of Eclipse, code named Juno, features a wide array of changes, including a new release of the m2eclipse plugin. In an effort to make getting started with Persistit as easy as possible, we have included the required m2e configuration sections in our pom.
128113
129Please contact Akiban if you have encounter any issues getting up and running with Persistit. 114Please contact Akiban if you have encounter any issues getting up and running with Persistit.
130115
131Fixed Issues116Persistit 3.1.2 - Asserts Added to Check for Correct Exchange Thread Behavior
132============117-----------------------------------------------------------------------------
133
134Old Journal Files Not Being Deleted
135-----------------------------------
136
137https://launchpad.net/akiban-persistit/+bug/1028016
138
139If a volume was removed from the configuration and Persistit was restarted the associated journal files would not be removed due to internal safety checks. In the event that the missing volume is intended behavior, a new configuration option was added. See the ``Detection and Ignoring of Missing Volumes`` feature description for more details.
140
141Class Index Updates Causing Write-Write Dependencies
142----------------------------------------------------
143
144https://launchpad.net/akiban-persistit/+bug/1024857
145
146https://launchpad.net/akiban-persistit/+bug/1026207
147
148Custom classes that are serialized into keys or values, through a custom KeyCoder or ValueCoder, are given a unique identifier. The identifier is determined transactionally the first time a class is written and stored in an internal tree. This would cause seemingly spurious aborts if more than one application threads simultaneously attempt to store the first instance of a given class.
149
150Accumulator Memory Usage and Transaction Step Policy
151----------------------------------------------------
152
153https://launchpad.net/akiban-persistit/+bug/1028050
154
155https://launchpad.net/akiban-persistit/+bug/1028134
156
157Changes to Accumulators are stored were previously stored as individual Delta objects. For long running transactions that heavily utilized Accumulators, this would cause excessive memory usage. These unique instances are no eliminated in most scenarios, resulting in no memory growth in all but pathological cases.
158
159Additionally, the Accumulator handling of the Transaction step value was inconsistent with how it was treated through an Exchange. Now, both classes allow a given step x to see any change that occurred at a step less than or equal to itself.
160
161
162Known Issues
163============
164As described in the *3.1.1 Known Issues*.
165
166|
167|
168
169************************************
1703.1.2
171************************************
172
173Release Date
174============
175July 13, 2012
176
177Overview
178========
179This is a bug fix release of the Persistit project (https://launchpad.net/akiban-persistit).
180
181Fixed Issues
182============
183
184Infinite Loop When Repacking Buffer
185-----------------------------------
186
187https://bugs.launchpad.net/bugs/1005206
188
189This was introduced late into the 3.1.1 development cycle. This could occur if a buffer required restructuring during pruning of a long value that was previously stored under a transaction. Upon the next save of this buffer to disk (e.g. shutdown), an infinite loop would occur.
190
191Corruption Exceptions During Various Operations
192-----------------------------------------------
193
194https://bugs.launchpad.net/bugs/1010079
195
196.. note::
197 Only the message indicates a database corruption. The data volume is actually correct and intact.
198
199This was introduced late into the 3.1.1 development cycle. This could occur if pruning a buffer containing a long record previously stored under a transaction required removal of keys and then that buffer was reused without further modification. A parallel structure associated with the every ``Buffer``, the ``FastIndex``, was not maintained during this operation.
200
201Slow Accumulator Operations
202---------------------------
203
204https://bugs.launchpad.net/bugs/1012859
205
206This bug preexisted but was unknown to the 3.1.1 release. If a thread starting a new transaction was interrupted during the call to ``begin()``, there was a chance for an internal object to wind up in an invalid state. This invalid state caused no visible consequences other than slower than expected ``Accumulator`` actions if this had occurred many times.
207
208B+Tree Corruption in Stress Test
209--------------------------------
210
211https://bugs.launchpad.net/akiban-persistit/+bug/1017957
212
213This bug preexisted but was unknown to the 3.1.1 release. An extremely rare combination of events corrupted memory structures causing an incorrect key-pointer pair to be inserted while deleting records in a key range. The bug was detected in an 8-hour stress test run.
214
215
216Slow Recovery Due to Temporary Tree IT Records
217----------------------------------------------
218
219https://bugs.launchpad.net/akiban-persistit/+bug/1018526
220
221This bug preexisted but was unknown to the 3.1.1 release. Every Tree created in a temporary volume was being assigned a tree handle recorded permanently in the journal. In one case the result was a journal containing millions of IT (Identify Tree) records, and these caused normal recovery to take a very long time. The fix keeps temporary trees out of the journal and removes IT records which may have been added previously.
222
223
224Asserts Added to Check for Correct Exchange Thread Behavior
225-----------------------------------------------------------
226118
227A bug in the Akiban Server code caused an Exchange to be used concurrently by two Threads, causing serious and seemingly unrelated failures in Persistit including instances of IllegalMonitorException and IllegalStateException. To guard against future occurrences, asserts were added to catch such concurrent use by multiple threads. Applications should be tested with asserts enabled to verify correct thread usage.119A bug in the Akiban Server code caused an Exchange to be used concurrently by two Threads, causing serious and seemingly unrelated failures in Persistit including instances of IllegalMonitorException and IllegalStateException. To guard against future occurrences, asserts were added to catch such concurrent use by multiple threads. Applications should be tested with asserts enabled to verify correct thread usage.
228 120
229121
230Known Issues
231============
232As described in the *3.1.1 Known Issues*.
233
234|
235|
236
237************************************
2383.1.1
239************************************
240
241Release Date
242============
243May 31, 2012
244
245Overview
246========
247This is the first open source release of the Persistit project (https://launchpad.net/akiban-persistit).
248122
249Known Issues123Known Issues
250============124============
@@ -283,7 +157,8 @@
283https://bugs.launchpad.net/akiban-persistit/+bug/1000331157https://bugs.launchpad.net/akiban-persistit/+bug/1000331
284158
285Multi-version values are not always pruned properly causing volume growth. The number of MVV records and their overhead size can be obtaining by running the IntegrityCheck task. 159Multi-version values are not always pruned properly causing volume growth. The number of MVV records and their overhead size can be obtaining by running the IntegrityCheck task.
160
286* Workaround 1: Run the IntegrityCheck task (CLI command icheck) with the -P option which will prune the MVVs. This will remove obsolete MVV instances and in many cases free up pages in which new data can be stored. However, it will not reduce the actual size of the volume file.161* Workaround 1: Run the IntegrityCheck task (CLI command icheck) with the -P option which will prune the MVVs. This will remove obsolete MVV instances and in many cases free up pages in which new data can be stored. However, it will not reduce the actual size of the volume file.
287162
288* Workaround 2: To reduce the size of the volume you can use the CLI commands save and load to offload and then reload the data into a newly created volume file. See http://www.akiban.com/ak-docs/admin/persistit/Management.html#management for more information about these operations.163* Workaround 2: To reduce the size of the volume you can use the CLI commands ``save`` and ``load`` to reload the data into a newly created volume file. See http://www.akiban.com/ak-docs/admin/persistit/Management.html#management for more information about these operations.
289164
290165
=== modified file 'doc/build/src/SphinxDocPrep.java'
--- doc/build/src/SphinxDocPrep.java 2012-06-11 21:25:37 +0000
+++ doc/build/src/SphinxDocPrep.java 2012-09-11 21:38:18 +0000
@@ -2,7 +2,10 @@
2import java.io.File;2import java.io.File;
3import java.io.FileReader;3import java.io.FileReader;
4import java.io.FileWriter;4import java.io.FileWriter;
5import java.io.IOException;
5import java.io.PrintWriter;6import java.io.PrintWriter;
7import java.util.ArrayList;
8import java.util.List;
6import java.util.SortedMap;9import java.util.SortedMap;
7import java.util.regex.Matcher;10import java.util.regex.Matcher;
8import java.util.regex.Pattern;11import java.util.regex.Pattern;
@@ -68,7 +71,10 @@
68 }71 }
6972
70 private void processLine(final String line) throws Exception {73 private void processLine(final String line) throws Exception {
71 if (line.contains(".. code-block:") || line.endsWith("::")) {74 if (line.contains("{{bug-list}}")) {
75 prepareBugList();
76 return;
77 } else if (line.contains(".. code-block:") || line.endsWith("::")) {
72 block = BlockState.WAIT_FIRST_BLANK_LINE;78 block = BlockState.WAIT_FIRST_BLANK_LINE;
73 } else if (line.isEmpty()) {79 } else if (line.isEmpty()) {
74 switch (block) {80 switch (block) {
@@ -134,14 +140,132 @@
134 text = text.replace("com.persistit.", "");140 text = text.replace("com.persistit.", "");
135 text = text.replace("java.lang.", "");141 text = text.replace("java.lang.", "");
136 text = text.replace("java.util.", "");142 text = text.replace("java.util.", "");
137 replacement= "`" + text + " <" + url + ">`_";143 replacement = "`" + text + " <" + url + ">`_";
138 }144 }
139 }145 }
140146
141 matcher.appendReplacement(sb, Matcher.quoteReplacement(replacement));147 matcher.appendReplacement(sb, Matcher.quoteReplacement(replacement));
142 }148 }
143149
150 private void prepareBugList() throws IOException {
151 List<String[]> rows = new ArrayList<String[]>();
152 rows.add(new String[] { "Bug Reference", "Fixed in|Version", "Summary" });
153 BufferedReader reader = null;
154 try {
155 String urls = "";
156 String version = "";
157 reader = new BufferedReader(new FileReader("../BugList"));
158 StringBuilder sb = new StringBuilder();
159 String line = null;
160 while ((line = reader.readLine()) != null) {
161 if (line.isEmpty()) {
162 if (sb.length() > 0) {
163 sb.append('|');
164 }
165 } else if (Character.isDigit(line.charAt(0))) {
166 if (!urls.isEmpty()) {
167 rows.add(new String[] { urls, version, sb.toString() });
168 urls = "";
169 version = "";
170 sb.setLength(0);
171 }
172 String[] split = line.split("\\:");
173 for (final String bug : split[0].trim().split(",")) {
174 if (urls.length() > 0) {
175 urls += '|';
176 }
177 urls = urls + "https://launchpad.net/bugs/" + bug;
178 }
179 version = split[1].trim();
180 } else {
181 sb.append(line.trim());
182 if (sb.length() > 0) {
183 sb.append('|');
184 }
185 }
186 }
187 if (!urls.isEmpty()) {
188 rows.add(new String[] { urls, version, sb.toString() });
189 }
190
191 int[] maxWidth = new int[3];
192 for (final String[] row : rows) {
193 for (int i = 0; i < 3; i++) {
194 for (String s : row[i].split("\\|")) {
195 maxWidth[i] = Math.max(s.length(), maxWidth[i]);
196 }
197 }
198 }
199
200 bugTableLine(sb, false, maxWidth);
201 for (int l = 0;; l++) {
202 if (bugTableText(sb, rows.get(0), maxWidth, l)) {
203 break;
204 }
205 }
206 bugTableLine(sb, true, maxWidth);
207 for (int i = 1; i < rows.size(); i++) {
208 String[] text = rows.get(i);
209 for (int l = 0;; l++) {
210 if (bugTableText(sb, text, maxWidth, l)) {
211 break;
212 }
213 }
214 bugTableLine(sb, false, maxWidth);
215 }
216 } catch (IOException e) {
217 System.out.println(e + " while trying to read BugList");
218 } finally {
219 if (reader != null) {
220 reader.close();
221 }
222 }
223 }
224
225 private void bugTableLine(StringBuilder sb, boolean dline, int[] width) {
226 sb.setLength(0);
227 sb.append('+');
228 for (int j = 0; j < 3; j++) {
229 for (int i = 0; i < width[j] + 2; i++) {
230 sb.append(dline ? '=' : '-');
231 }
232 sb.append('+');
233 }
234 writer.println(sb);
235 writer.flush();
236 }
237
238 private boolean bugTableText(StringBuilder sb, String[] text, int[] width, int line) {
239 String[] s = new String[3];
240 boolean done = true;
241 for (int j = 0; j < 3; j++) {
242 String[] split = text[j].split("\\|");
243 if (split.length > line) {
244 done = false;
245 s[j] = split[line];
246 }
247 }
248 if (!done) {
249 sb.setLength(0);
250 sb.append("|");
251 for (int j = 0; j < 3; j++) {
252 if (s[j] == null) {
253 s[j] = "";
254 }
255 sb.append(' ');
256 sb.append(s[j]);
257 for (int i = s[j].length() + 1; i < width[j] + 2; i++) {
258 sb.append(' ');
259 }
260 sb.append('|');
261 }
262 writer.println(sb);
263 }
264 writer.flush();
265 return done;
266 }
267
144 public static void main(final String[] args) throws Exception {268 public static void main(final String[] args) throws Exception {
145 new SphinxDocPrep().prepare(args);269 new SphinxDocPrep().prepare(args);
146 }270 }
147}271}
148272
=== modified file 'src/main/java/com/persistit/IntegrityCheck.java'
--- src/main/java/com/persistit/IntegrityCheck.java 2012-08-31 14:06:47 +0000
+++ src/main/java/com/persistit/IntegrityCheck.java 2012-09-11 21:38:18 +0000
@@ -1158,7 +1158,7 @@
1158 }1158 }
1159 }1159 }
1160 }1160 }
1161 } catch (Exception e) {1161 } catch (final Exception e) {
1162 addFault(e.toString(), page, level, 0);1162 addFault(e.toString(), page, level, 0);
1163 }1163 }
1164 return true;1164 return true;
@@ -1213,7 +1213,7 @@
12131213
1214 fromPage = longPage;1214 fromPage = longPage;
1215 longPage = longBuffer.getRightSibling();1215 longPage = longBuffer.getRightSibling();
1216 } catch (Exception e) {1216 } catch (final Exception e) {
1217 addFault(e.toString() + " while verifying long record page " + longPage, page, 0, foundAt);1217 addFault(e.toString() + " while verifying long record page " + longPage, page, 0, foundAt);
1218 break;1218 break;
1219 } finally {1219 } finally {
12201220
=== modified file 'src/main/java/com/persistit/JournalManager.java'
--- src/main/java/com/persistit/JournalManager.java 2012-08-28 16:15:27 +0000
+++ src/main/java/com/persistit/JournalManager.java 2012-09-11 21:38:18 +0000
@@ -29,7 +29,6 @@
29import java.util.Collections;29import java.util.Collections;
30import java.util.Comparator;30import java.util.Comparator;
31import java.util.HashMap;31import java.util.HashMap;
32import java.util.HashSet;
33import java.util.Iterator;32import java.util.Iterator;
34import java.util.List;33import java.util.List;
35import java.util.Map;34import java.util.Map;
3635
=== modified file 'src/main/java/com/persistit/JournalManagerBench.java'
--- src/main/java/com/persistit/JournalManagerBench.java 2012-08-20 19:24:58 +0000
+++ src/main/java/com/persistit/JournalManagerBench.java 2012-09-11 21:38:18 +0000
@@ -123,7 +123,7 @@
123 }123 }
124 if (remaining > buffer.capacity()) {124 if (remaining > buffer.capacity()) {
125 remaining = buffer.capacity();125 remaining = buffer.capacity();
126 long unaligned = fc.size() % 16384;126 final long unaligned = fc.size() % 16384;
127 if (unaligned > 0) {127 if (unaligned > 0) {
128 remaining = remaining - (16384 - unaligned);128 remaining = remaining - (16384 - unaligned);
129 }129 }
@@ -139,12 +139,12 @@
139139
140 private void doOneCycle(final long time, final int align, final long extension, final int size) throws Exception {140 private void doOneCycle(final long time, final int align, final long extension, final int size) throws Exception {
141 // Make a fake transaction record141 // Make a fake transaction record
142 String header = String.format("\nsize=%06d count=%06d time=%012d\n", size, count, time);142 final String header = String.format("\nsize=%06d count=%06d time=%012d\n", size, count, time);
143 byte[] b = header.getBytes();143 final byte[] b = header.getBytes();
144 System.arraycopy(b, 0, bytes, 0, b.length);144 System.arraycopy(b, 0, bytes, 0, b.length);
145145
146 // Add the record, possibly offset to maintaining alignment146 // Add the record, possibly offset to maintaining alignment
147 int toRewrite = (int) (currentAddress - writeAddress);147 final int toRewrite = (int) (currentAddress - writeAddress);
148 buffer.position(toRewrite);148 buffer.position(toRewrite);
149 buffer.put(bytes, 0, size);149 buffer.put(bytes, 0, size);
150 boolean extended = false;150 boolean extended = false;
151151
=== modified file 'src/main/java/com/persistit/Persistit.java'
--- src/main/java/com/persistit/Persistit.java 2012-08-31 20:20:13 +0000
+++ src/main/java/com/persistit/Persistit.java 2012-09-11 21:38:18 +0000
@@ -725,7 +725,7 @@
725 for (final BufferPool pool : _bufferPoolTable.values()) {725 for (final BufferPool pool : _bufferPoolTable.values()) {
726 try {726 try {
727 pool.recordBufferInventory(timestamp);727 pool.recordBufferInventory(timestamp);
728 } catch (PersistitException e) {728 } catch (final PersistitException e) {
729 getLogBase().bufferInventoryException.log(e);729 getLogBase().bufferInventoryException.log(e);
730 }730 }
731 }731 }
732732
=== modified file 'src/test/java/com/persistit/Bug1041293Test.java'
--- src/test/java/com/persistit/Bug1041293Test.java 2012-09-04 21:01:23 +0000
+++ src/test/java/com/persistit/Bug1041293Test.java 2012-09-11 21:38:18 +0000
@@ -34,7 +34,7 @@
34 final Configuration config = _persistit.getConfiguration();34 final Configuration config = _persistit.getConfiguration();
35 final VolumeSpecification vspec = config.volumeSpecification("${datapath}/test,pageSize:2048,create,"35 final VolumeSpecification vspec = config.volumeSpecification("${datapath}/test,pageSize:2048,create,"
36 + "initialPages:100,extensionPages:100,maximumPages:25000");36 + "initialPages:100,extensionPages:100,maximumPages:25000");
37 Volume volume = _persistit.loadVolume(vspec);37 final Volume volume = _persistit.loadVolume(vspec);
38 volume.open(_persistit);38 volume.open(_persistit);
39 }39 }
4040
4141
=== modified file 'src/test/java/com/persistit/TrackingFileChannel.java'
--- src/test/java/com/persistit/TrackingFileChannel.java 2012-08-27 17:31:02 +0000
+++ src/test/java/com/persistit/TrackingFileChannel.java 2012-09-11 21:38:18 +0000
@@ -15,9 +15,8 @@
1515
16package com.persistit;16package com.persistit;
1717
18import static org.junit.Assert.assertEquals;
19import static org.junit.Assert.assertTrue;18import static org.junit.Assert.assertTrue;
20import static org.junit.Assert.fail;19
21import java.io.IOException;20import java.io.IOException;
22import java.nio.ByteBuffer;21import java.nio.ByteBuffer;
23import java.nio.MappedByteBuffer;22import java.nio.MappedByteBuffer;
@@ -161,9 +160,9 @@
161 return _readPositions;160 return _readPositions;
162 }161 }
163162
164 public void assertOrdered(boolean read, boolean forward) {163 public void assertOrdered(final boolean read, final boolean forward) {
165 final List<Long> list = read ? _readPositions : _writePositions;164 final List<Long> list = read ? _readPositions : _writePositions;
166 long previous = forward ? -1 : Long.MAX_VALUE;165 final long previous = forward ? -1 : Long.MAX_VALUE;
167 for (final Long position : list) {166 for (final Long position : list) {
168 if (forward) {167 if (forward) {
169 assertTrue("Position should be larger", position > previous);168 assertTrue("Position should be larger", position > previous);
170169
=== modified file 'src/test/java/com/persistit/stress/unit/CommitBench.java'
--- src/test/java/com/persistit/stress/unit/CommitBench.java 2012-08-24 13:57:19 +0000
+++ src/test/java/com/persistit/stress/unit/CommitBench.java 2012-09-11 21:38:18 +0000
@@ -85,11 +85,11 @@
85 /*85 /*
86 * Damage the file so that there's no keystone checkpoint86 * Damage the file so that there's no keystone checkpoint
87 */87 */
88 RandomAccessFile raf = new RandomAccessFile(file, "rws");88 final RandomAccessFile raf = new RandomAccessFile(file, "rws");
89 raf.seek(0);89 raf.seek(0);
90 raf.write(new byte[256]);90 raf.write(new byte[256]);
91 raf.close();91 raf.close();
92 } catch (IOException e) {92 } catch (final IOException e) {
93 throw new RuntimeException(e);93 throw new RuntimeException(e);
94 }94 }
95 } else {95 } else {

Subscribers

People subscribed via source and target branches