Skip to content

Commit 8b12754

Browse files
committed
[optimize] Use existing address when reindexing nodes
1 parent 3be238a commit 8b12754

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

exist-core/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,7 @@
866866
<include>src/main/java/org/exist/http/urlrewrite/Redirect.java</include>
867867
<include>src/main/java/org/exist/http/urlrewrite/RewriteConfig.java</include>
868868
<include>src/main/java/org/exist/indexing/Index.java</include>
869+
<include>src/main/java/org/exist/indexing/IndexController.java</include>
869870
<include>src/main/java/org/exist/indexing/IndexManager.java</include>
870871
<include>src/main/java/org/exist/jetty/JettyStart.java</include>
871872
<include>src/main/java/org/exist/jetty/ServerShutdown.java</include>
@@ -1154,6 +1155,7 @@
11541155
<exclude>src/main/java/org/exist/http/urlrewrite/Redirect.java</exclude>
11551156
<exclude>src/main/java/org/exist/http/urlrewrite/RewriteConfig.java</exclude>
11561157
<exclude>src/main/java/org/exist/indexing/Index.java</exclude>
1158+
<include>src/main/java/org/exist/indexing/IndexController.java</include>
11571159
<exclude>src/main/java/org/exist/indexing/IndexManager.java</exclude>
11581160
<exclude>src/main/java/org/exist/jetty/JettyStart.java</exclude>
11591161
<exclude>src/main/java/org/exist/jetty/ServerShutdown.java</exclude>

exist-core/src/main/java/org/exist/indexing/IndexController.java

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
11
/*
2+
* Elemental
3+
* Copyright (C) 2024, Evolved Binary Ltd
4+
*
5+
6+
* https://www.evolvedbinary.com | https://www.elemental.xyz
7+
*
8+
* This library is free software; you can redistribute it and/or
9+
* modify it under the terms of the GNU Lesser General Public
10+
* License as published by the Free Software Foundation; version 2.1.
11+
*
12+
* This library is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15+
* Lesser General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU Lesser General Public
18+
* License along with this library; if not, write to the Free Software
19+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20+
*
21+
* NOTE: Parts of this file contain code from 'The eXist-db Authors'.
22+
* The original license header is included below.
23+
*
24+
* =====================================================================
25+
*
226
* eXist-db Open Source Native XML Database
327
* Copyright (C) 2001 The eXist-db Authors
428
*
@@ -225,7 +249,7 @@ public void reindex(final Txn transaction, final IStoredNode<? extends IStoredNo
225249

226250
setReindexing(true);
227251
try {
228-
final IStoredNode<? extends IStoredNode> node = broker.objectWith(new NodeProxy(null, reindexRoot.getOwnerDocument(), reindexRoot.getNodeId()));
252+
final IStoredNode<? extends IStoredNode> node = broker.objectWith(new NodeProxy(null, reindexRoot.getOwnerDocument(), reindexRoot.getNodeId(), reindexRoot.getInternalAddress()));
229253
listener = getStreamListener(node.getOwnerDocument(), mode);
230254
listener.startIndexDocument(transaction);
231255
try {

0 commit comments

Comments
 (0)