Skip to content

Commit 6f11238

Browse files
Index manager close bug was fixed.
1 parent bf7aee0 commit 6f11238

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

core/src/main/java/com/orientechnologies/orient/core/index/OIndexManagerAbstract.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@
1515
*/
1616
package com.orientechnologies.orient.core.index;
1717

18-
import java.util.*;
18+
import java.util.ArrayList;
19+
import java.util.Arrays;
20+
import java.util.Collection;
21+
import java.util.Collections;
22+
import java.util.HashMap;
23+
import java.util.HashSet;
24+
import java.util.List;
25+
import java.util.Map;
26+
import java.util.Set;
1927
import java.util.concurrent.ConcurrentHashMap;
2028
import java.util.concurrent.locks.ReadWriteLock;
2129
import java.util.concurrent.locks.ReentrantReadWriteLock;
@@ -253,7 +261,7 @@ public void close() {
253261
if (indexInternal != null) {
254262
indexInternal.close();
255263

256-
final ODatabaseRecord databaseRecord = getDatabase();
264+
final ODatabaseRecord databaseRecord = ODatabaseRecordThreadLocal.INSTANCE.getIfDefined();
257265
if (databaseRecord != null)
258266
databaseRecord.unregisterListener(indexInternal);
259267
}

server/src/main/java/com/orientechnologies/orient/server/network/protocol/binary/ONetworkProtocolBinary.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,8 +1121,7 @@ protected void command() throws IOException {
11211121
listener.setFetchPlan(((OCommandRequestInternal) connection.database.command(command)).getFetchPlan());
11221122

11231123
((OCommandRequestInternal) connection.database.command(command)).execute();
1124-
1125-
1124+
11261125
if (empty.get())
11271126
try {
11281127
sendOk(clientTxId);

0 commit comments

Comments
 (0)