Skip to content

Commit c953941

Browse files
committed
add unsynced bytes to EnvInfo
1 parent b4c6f7c commit c953941

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mdbx/env.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ type EnvInfo struct {
350350
SystemPageSize uint //
351351
MiLastPgNo uint64 //
352352
AutoSyncThreshold uint //
353+
UnsyncedBytes uint // how many bytes have been committed but not flushed yet to disk
353354
SinceSync time.Duration //
354355
AutosyncPeriod time.Duration //
355356
SinceReaderCheck time.Duration //
@@ -423,6 +424,7 @@ func castEnvInfo(_info C.MDBX_envinfo) *EnvInfo {
423424
MiLastPgNo: uint64(_info.mi_last_pgno),
424425

425426
AutoSyncThreshold: uint(_info.mi_autosync_threshold),
427+
UnsyncedBytes: uint(_info.mi_unsync_volume),
426428
SinceSync: toDuration(_info.mi_since_sync_seconds16dot16),
427429
AutosyncPeriod: toDuration(_info.mi_autosync_period_seconds16dot16),
428430
SinceReaderCheck: toDuration(_info.mi_since_reader_check_seconds16dot16),

0 commit comments

Comments
 (0)