nonPhysicalRollback is called when user calls Rollback directly, in this case we do not need to reload the free pages from disk.
()
| 310 | |
| 311 | // nonPhysicalRollback is called when user calls Rollback directly, in this case we do not need to reload the free pages from disk. |
| 312 | func (tx *Tx) nonPhysicalRollback() { |
| 313 | if tx.db == nil { |
| 314 | return |
| 315 | } |
| 316 | if tx.writable { |
| 317 | tx.db.freelist.Rollback(tx.meta.Txid()) |
| 318 | } |
| 319 | tx.close() |
| 320 | } |
| 321 | |
| 322 | // rollback needs to reload the free pages from disk in case some system error happens like fsync error. |
| 323 | func (tx *Tx) rollback() { |