After set SyncWrites to true, the success of db.Update doesn't not means 100% success

Hello, I’m using badger as the persistency storage, and I want to make sure if the db.Update returns no err, the data is 100% safe. However, after I checked the code in value.go:808:

defer func() {
if vlog.opt.SyncWrites {
if err := curlf.Sync(); err != nil {
vlog.opt.Errorf(“Error while curlf sync: %v\n”, err)
}
}
}()

it seems like if the Sync() returns an err, it doesn’t return it to outer level, but just print a log. Which means if the db.Update() returns no err, there is still possible to have the err to write the data into valuelog.

If my concern is right, is there any way to achieve my goal?