Skip to content

Commit 40f590f

Browse files
committed
Merge branch '1.7.3'
2 parents c907318 + 0eb4f19 commit 40f590f

File tree

61 files changed

+1116
-476
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1116
-476
lines changed

build.xml

+32-32
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<property environment="env"/>
66
<property name="vendor" value="Orient Technologies Ltd"/>
77
<property name="product" value="OrientDB"/>
8-
<property name="version" value="1.7.2"/>
8+
<property name="version" value="1.7.3"/>
99
<condition property="community.release" value="${releaseHome}/orientdb-community-${version}"
1010
else="../releases/orientdb-community-${version}">
1111
<isset property="releaseHome"/>
@@ -35,41 +35,41 @@
3535
<fileset dir="tests" includes="build.xml"/>
3636
</subant>
3737

38-
<echo> ___ ___ ____ _ </echo>
39-
<echo> .' `.|_ ||_ _| | | </echo>
40-
<echo>/ .-. \ | |_/ / | | </echo>
41-
<echo>| | | | | __'. |_| </echo>
42-
<echo>\ `-' /_| | \ \_ _ </echo>
43-
<echo> `.___.'|____||____| (_) </echo>
44-
</sequential>
38+
<echo>___ ___ ____ _</echo>
39+
<echo>.' `.|_ ||_ _| | |</echo>
40+
<echo>/ .-. \ | |_/ / | |</echo>
41+
<echo>| | | | | __'. |_|</echo>
42+
<echo>\ `-' /_| | \ \_ _</echo>
43+
<echo>`.___.'|____||____| (_)</echo>
44+
</sequential>
4545

4646
</macrodef>
4747

4848
<target name="init">
49-
<echo> . </echo>
50-
<echo> .` ` </echo>
51-
<echo> , `:. </echo>
52-
<echo> `,` ,:` </echo>
53-
<echo> .,. :,, </echo>
54-
<echo> .,, ,,, </echo>
55-
<echo> . .,.::::: ```` ::::::::: :::::::::</echo>
56-
<echo> ,` .::,,,,::.,,,,,,`;; .: :::::::::: ::: :::</echo>
57-
<echo> `,. ::,,,,,,,:.,,.` ` .: ::: ::: ::: :::</echo>
58-
<echo> ,,:,:,,,,,,,,::. ` ` `` .: ::: ::: ::: :::</echo>
59-
<echo> ,,:.,,,,,,,,,: `::, ,, ::,::` : :,::` :::: ::: ::: ::: :::</echo>
60-
<echo> ,:,,,,,,,,,,::,: ,, :. : :: : .: ::: ::: :::::::</echo>
61-
<echo> :,,,,,,,,,,:,:: ,, : : : : .: ::: ::: :::::::::</echo>
62-
<echo> ` :,,,,,,,,,,:,::, ,, .:::::::: : : .: ::: ::: ::: :::</echo>
63-
<echo> `,...,,:,,,,,,,,,: .:,. ,, ,, : : .: ::: ::: ::: :::</echo>
64-
<echo> .,,,,::,,,,,,,: `: , ,, : ` : : .: ::: ::: ::: :::</echo>
65-
<echo> ...,::,,,,::.. `: .,, :, : : : .: ::::::::::: ::: :::</echo>
66-
<echo> ,::::,,,. `: ,, ::::: : : .: ::::::::: ::::::::::</echo>
67-
<echo> ,,:` `,,. </echo>
68-
<echo> ,,, .,` </echo>
69-
<echo> ,,. `, GRAPH DATABASE</echo>
70-
<echo> `` `. COMMUNITY EDITION</echo>
71-
<echo> `` www.orientdb.org</echo>
72-
<echo> ` </echo>
49+
<echo>.</echo>
50+
<echo>.` `</echo>
51+
<echo>, `:.</echo>
52+
<echo>`,` ,:`</echo>
53+
<echo>.,. :,,</echo>
54+
<echo>.,, ,,,</echo>
55+
<echo>. .,.::::: ```` ::::::::: :::::::::</echo>
56+
<echo>,` .::,,,,::.,,,,,,`;; .: :::::::::: ::: :::</echo>
57+
<echo>`,. ::,,,,,,,:.,,.` ` .: ::: ::: ::: :::</echo>
58+
<echo>,,:,:,,,,,,,,::. ` ` `` .: ::: ::: ::: :::</echo>
59+
<echo>,,:.,,,,,,,,,: `::, ,, ::,::` : :,::` :::: ::: ::: ::: :::</echo>
60+
<echo>,:,,,,,,,,,,::,: ,, :. : :: : .: ::: ::: :::::::</echo>
61+
<echo>:,,,,,,,,,,:,:: ,, : : : : .: ::: ::: :::::::::</echo>
62+
<echo>` :,,,,,,,,,,:,::, ,, .:::::::: : : .: ::: ::: ::: :::</echo>
63+
<echo>`,...,,:,,,,,,,,,: .:,. ,, ,, : : .: ::: ::: ::: :::</echo>
64+
<echo>.,,,,::,,,,,,,: `: , ,, : ` : : .: ::: ::: ::: :::</echo>
65+
<echo>...,::,,,,::.. `: .,, :, : : : .: ::::::::::: ::: :::</echo>
66+
<echo>,::::,,,. `: ,, ::::: : : .: ::::::::: ::::::::::</echo>
67+
<echo>,,:` `,,.</echo>
68+
<echo>,,, .,`</echo>
69+
<echo>,,. `, GRAPH DATABASE</echo>
70+
<echo>`` `. COMMUNITY EDITION</echo>
71+
<echo>`` www.orientdb.org</echo>
72+
<echo>`</echo>
7373

7474
<mkdir dir="${community.release}"/>
7575
<mkdir dir="${community.release}/log"/>

client/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>com.orientechnologies</groupId>
2626
<artifactId>orientdb-parent</artifactId>
27-
<version>1.7.2</version>
27+
<version>1.7.3</version>
2828
<relativePath>../</relativePath>
2929
</parent>
3030

commons/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>com.orientechnologies</groupId>
2626
<artifactId>orientdb-parent</artifactId>
27-
<version>1.7.2</version>
27+
<version>1.7.3</version>
2828
<relativePath>../</relativePath>
2929
</parent>
3030

core/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<parent>
1818
<groupId>com.orientechnologies</groupId>
1919
<artifactId>orientdb-parent</artifactId>
20-
<version>1.7.2</version>
20+
<version>1.7.3</version>
2121
<relativePath>../</relativePath>
2222
</parent>
2323

core/src/main/java/com/orientechnologies/orient/core/OConstants.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
package com.orientechnologies.orient.core;
1717

1818
public class OConstants {
19-
public static final String ORIENT_VERSION = "1.7.2";
19+
public static final String ORIENT_VERSION = "1.7.3";
2020

2121
public static final String ORIENT_URL = "www.orientechnologies.com";
2222

core/src/main/java/com/orientechnologies/orient/core/config/OGlobalConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public enum OGlobalConfiguration {
9898
"Maximum size of WAL cache (in amount of WAL pages, each page is 64k) <= 0 means that caching will be switched off.",
9999
Integer.class, 3000),
100100

101-
WAL_MAX_SEGMENT_SIZE("storage.wal.maxSegmentSize", "Maximum size of single. WAL segment in megabytes.", Integer.class, 256),
101+
WAL_MAX_SEGMENT_SIZE("storage.wal.maxSegmentSize", "Maximum size of single. WAL segment in megabytes.", Integer.class, 64),
102102

103103
WAL_MAX_SIZE("storage.wal.maxSize", "Maximum size of WAL on disk in megabytes.", Integer.class, 4 * 1024),
104104

core/src/main/java/com/orientechnologies/orient/core/db/record/ODatabaseRecordAbstract.java

+9-4
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,10 @@ public void close() {
443443

444444
underlying.callOnCloseListeners();
445445

446+
for (ORecordHook h : hooks.keySet())
447+
h.onUnregister();
448+
hooks.clear();
449+
446450
if (metadata != null) {
447451
if (!(getStorage() instanceof OStorageProxy)) {
448452
final OIndexManager indexManager = metadata.getIndexManager();
@@ -459,8 +463,6 @@ public void close() {
459463

460464
super.close();
461465

462-
hooks.clear();
463-
464466
user = null;
465467
level1Cache.shutdown();
466468
ODatabaseRecordThreadLocal.INSTANCE.remove();
@@ -1385,7 +1387,7 @@ public <DB extends ODatabaseComplex<?>> DB setMVCC(boolean mvcc) {
13851387
/**
13861388
* {@inheritDoc}
13871389
*/
1388-
public <DB extends ODatabaseComplex<?>> DB registerHook(final ORecordHook iHookImpl, ORecordHook.HOOK_POSITION iPosition) {
1390+
public <DB extends ODatabaseComplex<?>> DB registerHook(final ORecordHook iHookImpl, final ORecordHook.HOOK_POSITION iPosition) {
13891391
final Map<ORecordHook, ORecordHook.HOOK_POSITION> tmp = new LinkedHashMap<ORecordHook, ORecordHook.HOOK_POSITION>(hooks);
13901392
tmp.put(iHookImpl, iPosition);
13911393
hooks.clear();
@@ -1409,7 +1411,10 @@ public <DB extends ODatabaseComplex<?>> DB registerHook(final ORecordHook iHookI
14091411
* {@inheritDoc}
14101412
*/
14111413
public <DB extends ODatabaseComplex<?>> DB unregisterHook(final ORecordHook iHookImpl) {
1412-
hooks.remove(iHookImpl);
1414+
if (iHookImpl != null) {
1415+
iHookImpl.onUnregister();
1416+
hooks.remove(iHookImpl);
1417+
}
14131418
return (DB) this;
14141419
}
14151420

core/src/main/java/com/orientechnologies/orient/core/db/record/ORecordLazyList.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ public boolean addAll(Collection<? extends OIdentifiable> c) {
7979

8080
while (it.hasNext()) {
8181
Object o = it.next();
82-
if (o instanceof OIdentifiable)
82+
if (o == null)
83+
add(null);
84+
else if (o instanceof OIdentifiable)
8385
add((OIdentifiable) o);
8486
else
8587
OMultiValue.add(this, o);
@@ -407,9 +409,9 @@ public boolean lazyLoad(final boolean iInvalidateStream) {
407409

408410
for (String item : items) {
409411
if (item.length() == 0)
410-
continue;
411-
412-
super.add(new ORecordId(item));
412+
super.add(new ORecordId());
413+
else
414+
super.add(new ORecordId(item));
413415
}
414416

415417
modCount = currentModCount;

core/src/main/java/com/orientechnologies/orient/core/fetch/OFetchHelper.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ private static void processRecord(final ODocument record, final Object iUserObje
298298
final String iFieldPathFromRoot, final OFetchListener iListener, final OFetchContext iContext, final String iFormat)
299299
throws IOException {
300300

301+
if (record == null)
302+
return;
303+
301304
Object fieldValue;
302305

303306
iContext.onBeforeFetch(record);
@@ -363,7 +366,6 @@ private static void processRecord(final ODocument record, final Object iUserObje
363366
}
364367

365368
} catch (Exception e) {
366-
e.printStackTrace();
367369
OLogManager.instance().error(null, "Fetching error on record %s", e, record.getIdentity());
368370
}
369371
}
@@ -531,7 +533,9 @@ else if (fieldValue instanceof Iterable<?> || fieldValue instanceof ORidBag) {
531533
removeParsedFromMap(parsedRecords, d);
532534
d = d.getRecord();
533535

534-
if (!(d instanceof ODocument)) {
536+
if (d == null)
537+
iListener.processStandardField(null, d, null, iContext, iUserObject, "");
538+
else if (!(d instanceof ODocument)) {
535539
iListener.processStandardField(null, d, fieldName, iContext, iUserObject, "");
536540
} else {
537541
iContext.onBeforeDocument(iRootRecord, (ODocument) d, fieldName, iUserObject);

core/src/main/java/com/orientechnologies/orient/core/fetch/json/OJSONFetchContext.java

+11-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@
1616
*/
1717
package com.orientechnologies.orient.core.fetch.json;
1818

19-
import java.io.IOException;
20-
import java.math.BigDecimal;
21-
import java.util.Date;
22-
import java.util.Set;
23-
import java.util.Stack;
24-
2519
import com.orientechnologies.orient.core.config.OGlobalConfiguration;
2620
import com.orientechnologies.orient.core.db.record.OIdentifiable;
2721
import com.orientechnologies.orient.core.db.record.ridbag.ORidBag;
@@ -35,6 +29,12 @@
3529
import com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerJSON.FormatSettings;
3630
import com.orientechnologies.orient.core.version.ODistributedVersion;
3731

32+
import java.io.IOException;
33+
import java.math.BigDecimal;
34+
import java.util.Date;
35+
import java.util.Set;
36+
import java.util.Stack;
37+
3838
/**
3939
* @author luca.molino
4040
*
@@ -174,6 +174,11 @@ private void appendType(final StringBuilder iBuffer, final String iFieldName, fi
174174
}
175175

176176
public void writeSignature(final OJSONWriter json, final ORecordInternal<?> record) throws IOException {
177+
if( record == null ) {
178+
json.write("null");
179+
return;
180+
}
181+
177182
boolean firstAttribute = true;
178183

179184
if (settings.includeType) {

core/src/main/java/com/orientechnologies/orient/core/hook/ODocumentHookAbstract.java

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ public abstract class ODocumentHookAbstract implements ORecordHook {
3434
protected ODocumentHookAbstract() {
3535
}
3636

37+
@Override
38+
public void onUnregister() {
39+
}
40+
3741
/**
3842
* It's called just before to create the new document.
3943
*

core/src/main/java/com/orientechnologies/orient/core/hook/ORecordHook.java

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public enum RESULT {
4141
RECORD_NOT_CHANGED, RECORD_CHANGED, SKIP
4242
}
4343

44+
public void onUnregister();
45+
4446
public RESULT onTrigger(TYPE iType, ORecord<?> iRecord);
4547

4648
public DISTRIBUTED_EXECUTION_MODE getDistributedExecutionMode();

core/src/main/java/com/orientechnologies/orient/core/hook/ORecordHookAbstract.java

+7
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@
2424
* @see ORecordHook
2525
*/
2626
public abstract class ORecordHookAbstract implements ORecordHook {
27+
28+
/**
29+
* Called on unregistration.
30+
*/
31+
public void onUnregister() {
32+
}
33+
2734
/**
2835
* It's called just before to create the new iRecord.
2936
*

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public interface OIndexDefinition extends OIndexCallback {
126126

127127
void setCollate(OCollate collate);
128128

129-
boolean isNullValuesIgnored();
129+
boolean isNullValuesIgnored();
130130

131-
void setNullValuesIgnored(boolean value);
131+
void setNullValuesIgnored(boolean value);
132132
}

0 commit comments

Comments
 (0)