void storePersist ( ) throws java . io . IOException { // 00 then start writing // 01 delete requested; do not write // 10 already written; do nothing // 11 already written & deleted; do nothing if ( isDeleted ( ) ) return ; // 01 and 11 cases if ( isPersisted ( ) ) return ; // 10 case H2O . getPM ( ) . store ( backend ( ) , this ) ; // Write to disk // 00 -> 10 expected, set write bit // 10 assert; only Cleaner writes // 01 delete-during-write; delete again // 11 assert; only Cleaner writes assert ! isPersisted ( ) ; // Only Cleaner writes setDsk ( ) ; // Not locked, not atomic, so can only called by one thread: Cleaner if ( isDeleted ( ) ) // Check del bit AFTER setting persist bit; close race with deleting user thread H2O . getPM ( ) . delete ( backend ( ) , this ) ; // Possibly nothing to delete (race with writer) }
Best - effort store complete Values to disk .