Buggy code:
public ORecordConflictStrategy getConflictStrategy ( ) { } public void setConflictStrategy ( final ORecordConflictStrategy conflictResolver ) { } protected void checkOpeness ( ) { } protected void makeFullCheckpoint ( ) throws IOException { } protected void preOpenSteps ( ) throws IOException { } protected void postCreateSteps ( ) { } protected void preCreateSteps ( ) throws IOException { } protected abstract void initWalAndDiskCache ( ) throws IOException { } protected void postCloseSteps ( boolean onDelete ) throws IOException { } protected void preCloseSteps ( ) throws IOException { } protected void postDeleteSteps ( ) { } protected void makeStorageDirty ( ) throws IOException { } protected void clearStorageDirty ( ) throws IOException { } protected boolean isDirty ( ) throws IOException { } protected void lock ( ) throws IOException { } protected void unlock ( ) throws IOException { } private ORawBuffer readRecord ( final OCluster clusterSegment , final ORecordId rid , boolean atomicLock , boolean loadTombstones , LOCKING_STRATEGY iLockingStrategy ) { } private void undoOperation ( List < OLogSequenceNumber > operationUnit ) throws IOException { } private boolean checkFirstAtomicUnitRecord ( int index , OWALRecord record ) { } private boolean checkLastAtomicUnitRecord ( int index , OWALRecord record , int size ) { } private void endStorageTx ( ) throws IOException { } private void startStorageTx ( OTransaction clientTx ) throws IOException { } private void rollbackStorageTx ( ) throws IOException { } private void restoreIfNeeded ( ) throws Exception { } private OStorageOperationResult < OPhysicalPosition > doCreateRecord ( ORecordId rid , byte [ ] content , ORecordVersion recordVersion , byte recordType , ORecordCallback < Long > callback , OCluster cluster , OPhysicalPosition ppos ) { } private OStorageOperationResult < ORecordVersion > doUpdateRecord ( ORecordId rid , boolean updateContent , byte [ ] content , ORecordVersion version , byte recordType , ORecordCallback < ORecordVersion > callback , OCluster cluster ) { } private OStorageOperationResult < Boolean > doDeleteRecord ( ORecordId rid , ORecordVersion version , OCluster cluster ) { } private OStorageOperationResult < Boolean > doHideMethod ( ORecordId rid , OCluster cluster ) { } private void unlockRecord ( ORecordId rid , LOCKING_STRATEGY iLockingStrategy ) { } private void lockRecord ( ORecordId rid , LOCKING_STRATEGY iLockingStrategy ) { } private ORawBuffer doReadRecord ( OCluster clusterSegment , ORecordId rid ) { } private void addDefaultClusters ( ) throws IOException { } private int createClusterFromConfig ( final OStorageClusterConfiguration config ) throws IOException { } private void setCluster ( int id , OCluster cluster ) { } private int registerCluster ( final OCluster cluster ) throws IOException { } private int doAddCluster ( String clusterName , boolean fullCheckPoint , Object [ ] parameters ) throws IOException { } private int addClusterInternal ( String clusterName , int clusterPos , boolean fullCheckPoint , Object ... parameters ) throws IOException { } private void doClose ( boolean force , boolean onDelete ) { } private byte [ ] checkAndIncrementVersion ( final OCluster iCluster , final ORecordId rid , final ORecordVersion version , final ORecordVersion iDatabaseVersion , final byte [ ] iRecordContent , final byte iRecordType ) { } private void commitEntry ( final OTransaction clientTx , final ORecordOperation txEntry ) throws IOException { } private void checkClusterSegmentIndexRange ( final int iClusterId ) { } private List < OLogSequenceNumber > readOperationUnit ( OLogSequenceNumber startLSN , OOperationUnitId unitId ) throws IOException { } private boolean restoreFromWAL ( ) throws IOException { } private boolean checkFullCheckPointIsComplete ( OLogSequenceNumber lastCheckPoint ) throws IOException { } private boolean checkFuzzyCheckPointIsComplete ( OLogSequenceNumber lastCheckPoint ) throws IOException { } private boolean restoreFromCheckPoint ( OAbstractCheckPointStartRecord checkPointRecord ) throws IOException { } private boolean restoreFromFullCheckPoint ( OFullCheckpointStartRecord checkPointRecord ) throws IOException { } private boolean restoreFromFuzzyCheckPoint ( OFuzzyCheckpointStartRecord checkPointRecord ) throws IOException { } private boolean restoreFromBegging ( ) throws IOException { } private boolean restoreFrom ( OLogSequenceNumber lsn ) throws IOException { } private long restoreWALBatch ( List < OWALRecord > batch , Map < OOperationUnitId , List < OLogSequenceNumber > > operationUnits , long recordsProcessed , int reportInterval , OModifiableBoolean atLestOnePageUpdate ) throws IOException { } private void rollbackAllUnfinishedWALOperations ( Map < OOperationUnitId , List < OLogSequenceNumber > > operationUnits ) throws IOException { } private void checkLowDiskSpaceAndFullCheckpointRequests ( ) { if ( ( transaction . get ( ) ) != null ) return ; if ( ( lowDiskSpace ) != null ) { if ( checkpointInProgress . compareAndSet ( false , true ) ) { try { diskCache . makeFuzzyCheckpoint ( ) ; if ( diskCache . checkLowDiskSpace ( ) ) { synch ( ) ; if ( diskCache . checkLowDiskSpace ( ) ) { throw new com . orientechnologies . orient . core . exception . OLowDiskSpaceException ( ( ( ( ( ( ( ( ( ( ( ( ( ( "Error<seq2seq4repair_space>occurred<seq2seq4repair_space>while<seq2seq4repair_space>executing<seq2seq4repair_space>a<seq2seq4repair_space>write<seq2seq4repair_space>operation<seq2seq4repair_space>to<seq2seq4repair_space>database<seq2seq4repair_space>'" + ( name ) ) + "'<seq2seq4repair_space>due<seq2seq4repair_space>to<seq2seq4repair_space>limited<seq2seq4repair_space>free<seq2seq4repair_space>space<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>disk<seq2seq4repair_space>(" ) + ( ( lowDiskSpace . freeSpace ) // ( 1024 * 1024 ) ) ) + "<seq2seq4repair_space>MB).<seq2seq4repair_space>The<seq2seq4repair_space>database<seq2seq4repair_space>is<seq2seq4repair_space>now<seq2seq4repair_space>working<seq2seq4repair_space>in<seq2seq4repair_space>read-only<seq2seq4repair_space>mode." ) + "<seq2seq4repair_space>Please<seq2seq4repair_space>close<seq2seq4repair_space>the<seq2seq4repair_space>database<seq2seq4repair_space>(or<seq2seq4repair_space>stop<seq2seq4repair_space>OrientDB),<seq2seq4repair_space>make<seq2seq4repair_space>room<seq2seq4repair_space>on<seq2seq4repair_space>your<seq2seq4repair_space>hard<seq2seq4repair_space>drive<seq2seq4repair_space>and<seq2seq4repair_space>then<seq2seq4repair_space>reopen<seq2seq4repair_space>the<seq2seq4repair_space>database.<seq2seq4repair_space>" ) + "The<seq2seq4repair_space>minimal<seq2seq4repair_space>required<seq2seq4repair_space>space<seq2seq4repair_space>is<seq2seq4repair_space>" ) + ( ( lowDiskSpace . requiredSpace ) // ( 1024 * 1024 ) ) ) + "<seq2seq4repair_space>MB.<seq2seq4repair_space>" ) + "Required<seq2seq4repair_space>space<seq2seq4repair_space>is<seq2seq4repair_space>now<seq2seq4repair_space>set<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( DISK_CACHE_FREE_SPACE_LIMIT . getValueAsInteger ( ) ) ) + "MB<seq2seq4repair_space>(you<seq2seq4repair_space>can<seq2seq4repair_space>change<seq2seq4repair_space>it<seq2seq4repair_space>by<seq2seq4repair_space>setting<seq2seq4repair_space>parameter<seq2seq4repair_space>" ) + ( DISK_CACHE_FREE_SPACE_LIMIT . getKey ( ) ) ) + ")<seq2seq4repair_space>." ) ) ; } else { lowDiskSpace = null ; } } else lowDiskSpace = null ; } finally { checkpointInProgress . set ( false ) ; } } } if ( ( checkpointRequest ) && ( ( writeAheadLog ) instanceof ODiskWriteAheadLog ) ) { if ( checkpointInProgress . compareAndSet ( false , true ) ) { try { final ODiskWriteAheadLog diskWriteAheadLog = ( ( ODiskWriteAheadLog ) ( writeAheadLog ) ) ; final long size = diskWriteAheadLog . size ( ) ; diskCache . makeFuzzyCheckpoint ( ) ; <START_BUG> if ( size >= ( diskWriteAheadLog . size ( ) ) ) <END_BUG> synch ( ) ; checkpointRequest = false ; } finally { checkpointInProgress . set ( false ) ; } } } } }

Fix:
if ( size <= ( diskWriteAheadLog . size ( ) ) )