Skip to content

Commit

Permalink
Merge branch '1.7.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
lvca committed Jun 12, 2014
2 parents c907318 + 0eb4f19 commit 40f590f
Show file tree
Hide file tree
Showing 61 changed files with 1,116 additions and 476 deletions.
64 changes: 32 additions & 32 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<property environment="env"/>
<property name="vendor" value="Orient Technologies Ltd"/>
<property name="product" value="OrientDB"/>
<property name="version" value="1.7.2"/>
<property name="version" value="1.7.3"/>
<condition property="community.release" value="${releaseHome}/orientdb-community-${version}"
else="../releases/orientdb-community-${version}">
<isset property="releaseHome"/>
Expand Down Expand Up @@ -35,41 +35,41 @@
<fileset dir="tests" includes="build.xml"/>
</subant>

<echo> ___ ___ ____ _ </echo>
<echo> .' `.|_ ||_ _| | | </echo>
<echo>/ .-. \ | |_/ / | | </echo>
<echo>| | | | | __'. |_| </echo>
<echo>\ `-' /_| | \ \_ _ </echo>
<echo> `.___.'|____||____| (_) </echo>
</sequential>
<echo>___ ___ ____ _</echo>
<echo>.' `.|_ ||_ _| | |</echo>
<echo>/ .-. \ | |_/ / | |</echo>
<echo>| | | | | __'. |_|</echo>
<echo>\ `-' /_| | \ \_ _</echo>
<echo>`.___.'|____||____| (_)</echo>
</sequential>

</macrodef>

<target name="init">
<echo> . </echo>
<echo> .` ` </echo>
<echo> , `:. </echo>
<echo> `,` ,:` </echo>
<echo> .,. :,, </echo>
<echo> .,, ,,, </echo>
<echo> . .,.::::: ```` ::::::::: :::::::::</echo>
<echo> ,` .::,,,,::.,,,,,,`;; .: :::::::::: ::: :::</echo>
<echo> `,. ::,,,,,,,:.,,.` ` .: ::: ::: ::: :::</echo>
<echo> ,,:,:,,,,,,,,::. ` ` `` .: ::: ::: ::: :::</echo>
<echo> ,,:.,,,,,,,,,: `::, ,, ::,::` : :,::` :::: ::: ::: ::: :::</echo>
<echo> ,:,,,,,,,,,,::,: ,, :. : :: : .: ::: ::: :::::::</echo>
<echo> :,,,,,,,,,,:,:: ,, : : : : .: ::: ::: :::::::::</echo>
<echo> ` :,,,,,,,,,,:,::, ,, .:::::::: : : .: ::: ::: ::: :::</echo>
<echo> `,...,,:,,,,,,,,,: .:,. ,, ,, : : .: ::: ::: ::: :::</echo>
<echo> .,,,,::,,,,,,,: `: , ,, : ` : : .: ::: ::: ::: :::</echo>
<echo> ...,::,,,,::.. `: .,, :, : : : .: ::::::::::: ::: :::</echo>
<echo> ,::::,,,. `: ,, ::::: : : .: ::::::::: ::::::::::</echo>
<echo> ,,:` `,,. </echo>
<echo> ,,, .,` </echo>
<echo> ,,. `, GRAPH DATABASE</echo>
<echo> `` `. COMMUNITY EDITION</echo>
<echo> `` www.orientdb.org</echo>
<echo> ` </echo>
<echo>.</echo>
<echo>.` `</echo>
<echo>, `:.</echo>
<echo>`,` ,:`</echo>
<echo>.,. :,,</echo>
<echo>.,, ,,,</echo>
<echo>. .,.::::: ```` ::::::::: :::::::::</echo>
<echo>,` .::,,,,::.,,,,,,`;; .: :::::::::: ::: :::</echo>
<echo>`,. ::,,,,,,,:.,,.` ` .: ::: ::: ::: :::</echo>
<echo>,,:,:,,,,,,,,::. ` ` `` .: ::: ::: ::: :::</echo>
<echo>,,:.,,,,,,,,,: `::, ,, ::,::` : :,::` :::: ::: ::: ::: :::</echo>
<echo>,:,,,,,,,,,,::,: ,, :. : :: : .: ::: ::: :::::::</echo>
<echo>:,,,,,,,,,,:,:: ,, : : : : .: ::: ::: :::::::::</echo>
<echo>` :,,,,,,,,,,:,::, ,, .:::::::: : : .: ::: ::: ::: :::</echo>
<echo>`,...,,:,,,,,,,,,: .:,. ,, ,, : : .: ::: ::: ::: :::</echo>
<echo>.,,,,::,,,,,,,: `: , ,, : ` : : .: ::: ::: ::: :::</echo>
<echo>...,::,,,,::.. `: .,, :, : : : .: ::::::::::: ::: :::</echo>
<echo>,::::,,,. `: ,, ::::: : : .: ::::::::: ::::::::::</echo>
<echo>,,:` `,,.</echo>
<echo>,,, .,`</echo>
<echo>,,. `, GRAPH DATABASE</echo>
<echo>`` `. COMMUNITY EDITION</echo>
<echo>`` www.orientdb.org</echo>
<echo>`</echo>

<mkdir dir="${community.release}"/>
<mkdir dir="${community.release}/log"/>
Expand Down
2 changes: 1 addition & 1 deletion client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-parent</artifactId>
<version>1.7.2</version>
<version>1.7.3</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-parent</artifactId>
<version>1.7.2</version>
<version>1.7.3</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<parent>
<groupId>com.orientechnologies</groupId>
<artifactId>orientdb-parent</artifactId>
<version>1.7.2</version>
<version>1.7.3</version>
<relativePath>../</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package com.orientechnologies.orient.core;

public class OConstants {
public static final String ORIENT_VERSION = "1.7.2";
public static final String ORIENT_VERSION = "1.7.3";

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

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

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,10 @@ public void close() {

underlying.callOnCloseListeners();

for (ORecordHook h : hooks.keySet())
h.onUnregister();
hooks.clear();

if (metadata != null) {
if (!(getStorage() instanceof OStorageProxy)) {
final OIndexManager indexManager = metadata.getIndexManager();
Expand All @@ -459,8 +463,6 @@ public void close() {

super.close();

hooks.clear();

user = null;
level1Cache.shutdown();
ODatabaseRecordThreadLocal.INSTANCE.remove();
Expand Down Expand Up @@ -1385,7 +1387,7 @@ public <DB extends ODatabaseComplex<?>> DB setMVCC(boolean mvcc) {
/**
* {@inheritDoc}
*/
public <DB extends ODatabaseComplex<?>> DB registerHook(final ORecordHook iHookImpl, ORecordHook.HOOK_POSITION iPosition) {
public <DB extends ODatabaseComplex<?>> DB registerHook(final ORecordHook iHookImpl, final ORecordHook.HOOK_POSITION iPosition) {
final Map<ORecordHook, ORecordHook.HOOK_POSITION> tmp = new LinkedHashMap<ORecordHook, ORecordHook.HOOK_POSITION>(hooks);
tmp.put(iHookImpl, iPosition);
hooks.clear();
Expand All @@ -1409,7 +1411,10 @@ public <DB extends ODatabaseComplex<?>> DB registerHook(final ORecordHook iHookI
* {@inheritDoc}
*/
public <DB extends ODatabaseComplex<?>> DB unregisterHook(final ORecordHook iHookImpl) {
hooks.remove(iHookImpl);
if (iHookImpl != null) {
iHookImpl.onUnregister();
hooks.remove(iHookImpl);
}
return (DB) this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ public boolean addAll(Collection<? extends OIdentifiable> c) {

while (it.hasNext()) {
Object o = it.next();
if (o instanceof OIdentifiable)
if (o == null)
add(null);
else if (o instanceof OIdentifiable)
add((OIdentifiable) o);
else
OMultiValue.add(this, o);
Expand Down Expand Up @@ -407,9 +409,9 @@ public boolean lazyLoad(final boolean iInvalidateStream) {

for (String item : items) {
if (item.length() == 0)
continue;

super.add(new ORecordId(item));
super.add(new ORecordId());
else
super.add(new ORecordId(item));
}

modCount = currentModCount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ private static void processRecord(final ODocument record, final Object iUserObje
final String iFieldPathFromRoot, final OFetchListener iListener, final OFetchContext iContext, final String iFormat)
throws IOException {

if (record == null)
return;

Object fieldValue;

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

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

if (!(d instanceof ODocument)) {
if (d == null)
iListener.processStandardField(null, d, null, iContext, iUserObject, "");
else if (!(d instanceof ODocument)) {
iListener.processStandardField(null, d, fieldName, iContext, iUserObject, "");
} else {
iContext.onBeforeDocument(iRootRecord, (ODocument) d, fieldName, iUserObject);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@
*/
package com.orientechnologies.orient.core.fetch.json;

import java.io.IOException;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Set;
import java.util.Stack;

import com.orientechnologies.orient.core.config.OGlobalConfiguration;
import com.orientechnologies.orient.core.db.record.OIdentifiable;
import com.orientechnologies.orient.core.db.record.ridbag.ORidBag;
Expand All @@ -35,6 +29,12 @@
import com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerJSON.FormatSettings;
import com.orientechnologies.orient.core.version.ODistributedVersion;

import java.io.IOException;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Set;
import java.util.Stack;

/**
* @author luca.molino
*
Expand Down Expand Up @@ -174,6 +174,11 @@ private void appendType(final StringBuilder iBuffer, final String iFieldName, fi
}

public void writeSignature(final OJSONWriter json, final ORecordInternal<?> record) throws IOException {
if( record == null ) {
json.write("null");
return;
}

boolean firstAttribute = true;

if (settings.includeType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ public abstract class ODocumentHookAbstract implements ORecordHook {
protected ODocumentHookAbstract() {
}

@Override
public void onUnregister() {
}

/**
* It's called just before to create the new document.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public enum RESULT {
RECORD_NOT_CHANGED, RECORD_CHANGED, SKIP
}

public void onUnregister();

public RESULT onTrigger(TYPE iType, ORecord<?> iRecord);

public DISTRIBUTED_EXECUTION_MODE getDistributedExecutionMode();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
* @see ORecordHook
*/
public abstract class ORecordHookAbstract implements ORecordHook {

/**
* Called on unregistration.
*/
public void onUnregister() {
}

/**
* It's called just before to create the new iRecord.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public interface OIndexDefinition extends OIndexCallback {

void setCollate(OCollate collate);

boolean isNullValuesIgnored();
boolean isNullValuesIgnored();

void setNullValuesIgnored(boolean value);
void setNullValuesIgnored(boolean value);
}
Loading

0 comments on commit 40f590f

Please sign in to comment.