Author: jukka
Date: Thu Jun 26 05:33:37 2014
New Revision: 1605671
URL: http://svn.apache.org/r1605671
Log:
1.0.2: Merged revision 1605670 (OAK-1917)
Modified:
jackrabbit/oak/branches/1.0/ (props changed)
jackrabbit/oak/branches/1.0/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/TarReader.java
Propchange: jackrabbit/oak/branches/1.0/
------------------------------------------------------------------------------
Merged /jackrabbit/oak/trunk:r1605670
Modified:
jackrabbit/oak/branches/1.0/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/TarReader.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/branches/1.0/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/TarReader.java?rev=1605671&r1=1605670&r2=1605671&view=diff
==============================================================================
---
jackrabbit/oak/branches/1.0/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/TarReader.java
(original)
+++
jackrabbit/oak/branches/1.0/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/file/TarReader.java
Thu Jun 26 05:33:37 2014
@@ -611,14 +611,15 @@ class TarReader {
size += getEntrySize(24 * count + 16);
size += 2 * BLOCK_SIZE;
- if (graph != null) {
- if (count == 0) {
- // none of the entries within this tar file are referenceable
- return null;
- } else if (size >= access.length() * 3 / 4) {
- // the space savings are not worth it at less than 25%
- return this;
- }
+ if (count == 0) {
+ // none of the entries within this tar file are referenceable
+ return null;
+ } else if (size >= access.length() * 3 / 4 && graph != null) {
+ // the space savings are not worth it at less than 25%,
+ // unless this tar file lacks a pre-compiled segment graph
+ // in which case we'll always generate a new tar file with
+ // the graph to speed up future garbage collection runs.
+ return this;
}
String name = file.getName();