mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 09:05:55 +00:00
Fix linter
This commit is contained in:
parent
52340212f6
commit
78eb9e0711
2 changed files with 0 additions and 21 deletions
16
rbf/rbf.go
16
rbf/rbf.go
|
|
@ -672,22 +672,6 @@ func RowValues(b []uint64) []uint64 {
|
|||
// return fmt.Sprintf("%s:%d", file, line)
|
||||
// }
|
||||
|
||||
// truncate truncates the file at path to sz bytes. File must exist.
|
||||
func (db *DB) truncate(path string, sz int64) error {
|
||||
f, err := os.OpenFile(path, os.O_WRONLY, 0666)
|
||||
if err != nil {
|
||||
return fmt.Errorf("open file: %w", err)
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
if err := f.Truncate(sz); err != nil {
|
||||
return fmt.Errorf("truncate: %w", err)
|
||||
} else if err := db.fsync(f); err != nil {
|
||||
return fmt.Errorf("sync: %w", err)
|
||||
}
|
||||
return f.Close()
|
||||
}
|
||||
|
||||
func (db *DB) fsync(f *os.File) error {
|
||||
if !db.cfg.FsyncEnabled {
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -962,11 +962,6 @@ func (tx *Tx) writeBitmapPage(pgno uint32, page []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (tx *Tx) writeMetaPage() error {
|
||||
tx.dirtyPages[0] = tx.meta[:]
|
||||
return nil
|
||||
}
|
||||
|
||||
func (tx *Tx) AddRoaring(name string, bm *roaring.Bitmap) (changed bool, err error) {
|
||||
tx.mu.RLock()
|
||||
defer tx.mu.RUnlock()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue