Merge pull request #2230 from abmyii/arm-dolt-push

Fixes for dolt on arm devices
This commit is contained in:
Aaron Son
2021-10-07 09:05:55 -07:00
committed by GitHub
2 changed files with 9 additions and 9 deletions
@@ -197,7 +197,7 @@ type tableEditorWriteCloser struct {
statsCB noms.StatsCB
stats types.AppliedEditStats
statOps int64
statOps int32
}
var _ DataMoverCloser = (*tableEditorWriteCloser)(nil)
@@ -213,8 +213,8 @@ func (te *tableEditorWriteCloser) GetSchema() schema.Schema {
// WriteRow implements TableWriteCloser
func (te *tableEditorWriteCloser) WriteRow(ctx context.Context, r row.Row) error {
if te.statsCB != nil && atomic.LoadInt64(&te.statOps) >= tableWriterStatUpdateRate {
atomic.StoreInt64(&te.statOps, 0)
if te.statsCB != nil && atomic.LoadInt32(&te.statOps) >= tableWriterStatUpdateRate {
atomic.StoreInt32(&te.statOps, 0)
te.statsCB(te.stats)
}
@@ -224,7 +224,7 @@ func (te *tableEditorWriteCloser) WriteRow(ctx context.Context, r row.Row) error
return err
}
_ = atomic.AddInt64(&te.statOps, 1)
_ = atomic.AddInt32(&te.statOps, 1)
te.stats.Additions++
return nil
@@ -244,7 +244,7 @@ func (te *tableEditorWriteCloser) WriteRow(ctx context.Context, r row.Row) error
return err
}
_ = atomic.AddInt64(&te.statOps, 1)
_ = atomic.AddInt32(&te.statOps, 1)
te.stats.Additions++
return nil
}
@@ -271,7 +271,7 @@ func (te *tableEditorWriteCloser) WriteRow(ctx context.Context, r row.Row) error
return err
}
_ = atomic.AddInt64(&te.statOps, 1)
_ = atomic.AddInt32(&te.statOps, 1)
te.stats.Modifications++
return nil
}
+3 -3
View File
@@ -29,10 +29,10 @@ type ReadStats struct {
}
type ReaderWithStats struct {
rd io.Reader
size int64
start time.Time
read uint64
size int64
rd io.Reader
start time.Time
closeCh chan struct{}
}