Beispiel #1
0
        /// <summary>
        ///   Mark te transaction file as committed
        /// </summary>
        private void SetCommited()
        {
            _isCommited = true;
            CheckFileAccess(null);

            // TODO Check atomicity
            // Writes the number of write actions after the byte and date
            _fsi.SetWritePositionNoVerification(OdbType.Byte.Size + OdbType.Long.Size, false);
            _fsi.WriteLong(_numberOfWriteActions, false);
            // FIXME The fsi.flush should not be called after the last write?
            _fsi.Flush();
            // Only set useBuffer = false when it is a local database to avoid
            // net io overhead

            _fsi.SetWritePositionNoVerification(0, false);
            _fsi.WriteByte(1, false);
        }