Skip to content

Commit

Permalink
Merge pull request neo4j#3201 from tinwelint/2.2-del-dyn-label-record…
Browse files Browse the repository at this point in the history
…s-w-del-node

[2.2] Deleted nodes includes deleted dynamic label records
  • Loading branch information
tinwelint committed Oct 9, 2014
2 parents 6fc4fad + be27f21 commit 72ac2d8
Show file tree
Hide file tree
Showing 14 changed files with 1,105 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
public class NodeRecord extends PrimitiveRecord
{
private long nextRel = Record.NO_NEXT_RELATIONSHIP.intValue();
private long labels;
private long labels = Record.NO_LABELS_FIELD.intValue();
private Collection<DynamicRecord> dynamicLabelRecords = emptyList();
private boolean isLight = true;
private boolean dense;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,24 @@
*/
public enum Record
{
NOT_IN_USE( (byte) 0, 0 ),
NOT_IN_USE( (byte) 0, 0 ),
IN_USE( (byte) 1, 1 ),
FIRST_IN_CHAIN( (byte) 2, 2 ),
RESERVED( (byte) -1, -1 ),
RESERVED( (byte) -1, -1 ),
NO_NEXT_PROPERTY( (byte) -1, -1 ),
NO_PREVIOUS_PROPERTY( (byte) -1, -1 ),
NO_NEXT_RELATIONSHIP( (byte) -1, -1 ),
NO_PREV_RELATIONSHIP( (byte) -1, -1 ),
NO_PREV_RELATIONSHIP( (byte) -1, -1 ),
NOT_DIRECTED( (byte) 0, 0 ),
DIRECTED( (byte) 2, 2 ),
NO_NEXT_BLOCK( (byte) -1, -1 ),
DIRECTED( (byte) 2, 2 ),
NO_NEXT_BLOCK( (byte) -1, -1 ),
NO_PREV_BLOCK( (byte) -1, -1 ),

NODE_PROPERTY( (byte) 0, 0 ),
REL_PROPERTY( (byte) 2, 2 );
REL_PROPERTY( (byte) 2, 2 ),

NO_LABELS_FIELD( (byte)0, 0 );

public static final byte CREATED_IN_TX = 2;

private byte byteValue;
Expand All @@ -52,7 +55,7 @@ public enum Record

/**
* Returns a byte value representation for this record type.
*
*
* @return The byte value for this record type
*/
public byte byteValue()
Expand All @@ -62,7 +65,7 @@ public byte byteValue()

/**
* Returns a int value representation for this record type.
*
*
* @return The int value for this record type
*/
public int intValue()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ private CommandReader figureOutCorrectReader( byte logFormatVersion, byte logEnt
switch ( logFormatVersion )
{
case LOG_VERSION_2_1:
case LOG_VERSION_2_2:
return new PhysicalLogNeoCommandReaderV1();
case LOG_VERSION_2_2:
return new PhysicalLogNeoCommandReaderV2();
}
}
throw new IllegalArgumentException( "Unknown log format version (" + logFormatVersion + ") and " +
Expand Down
Loading

0 comments on commit 72ac2d8

Please sign in to comment.