question: public boolean beforeWriting ( ) { if ( fileLockMethod != FileLock . LOCK_SERIALIZED ) { return true ; } while ( checkpointRunning ) { try { Thread . sleep ( 10 + ( int ) ( Math . random ( ) * 10 ) ) ; } catch ( Exception e ) { } } synchronized ( reconnectSync ) { if ( reconnectModified ( true ) ) { checkpointAllowed ++ ; if ( SysProperties . CHECK && checkpointAllowed > 20 ) { throw DbException . throwInternalError ( ) ; } return true ; } } reconnectCheckNext = System . currentTimeMillis ( ) - 1 ; reconnectLastLock = null ; return false ; }
target:  This method is called before writing to the transaction log.