Skip to content

Commit 0cb0764

Browse files
committed
fix: add property to deactivate computing documents size including versions - EXO-78104
Before this fix, when a document is modified, the indexation compute the size including all versions of a document This can lead to platform outage when documents have a lot of versions (in case of coedition in OO) When setting the property documents.content.compute.version.size to false, the sizeWithVersions is not computed and use current fileSize. This modification also apply in documents app when displaying file informations.
1 parent bd289a1 commit 0cb0764

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/search/src/main/java/org/exoplatform/services/wcm/search/connector/FileindexingConnector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public Document create(String id) {
243243

244244
Property dataProperty = contentNode.getProperty(NodetypeConstant.JCR_DATA);
245245
long fileSize = dataProperty.getLength();
246-
long fileSizeWithVersion = fileSize;
246+
long fileSizeWithVersion = 0;
247247
if (this.indexVersionSize) {
248248
fileSizeWithVersion = VersionHistoryUtils.computeVersionsSize(node);
249249
}

0 commit comments

Comments
 (0)