Skip to content

Commit

Permalink
[no-release-notes] write buf reuse bump (#8693)
Browse files Browse the repository at this point in the history
* [no-release-notes] bump for cache charset id

* add sysbench tests

* fix build

* [no-release-notes] prototype for reusing write buffer

* bump

* bump

* [ga-format-pr] Run go/utils/repofmt/format_repo.sh and go/Godeps/update.sh

* bump

* bump

* bump

* bump

* bump

* bump

* bump

* bump

---------

Co-authored-by: max-hoffman <[email protected]>
  • Loading branch information
max-hoffman and max-hoffman authored Dec 21, 2024
1 parent e71262c commit 049dea8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
4 changes: 2 additions & 2 deletions go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/dolthub/fslock v0.0.3
github.com/dolthub/ishell v0.0.0-20240701202509-2b217167d718
github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81
github.com/dolthub/vitess v0.0.0-20241211024425-b00987f7ba54
github.com/dolthub/vitess v0.0.0-20241220202600-b18f18d0cde7
github.com/dustin/go-humanize v1.0.1
github.com/fatih/color v1.13.0
github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568
Expand Down Expand Up @@ -57,7 +57,7 @@ require (
github.com/cespare/xxhash/v2 v2.2.0
github.com/creasty/defaults v1.6.0
github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2
github.com/dolthub/go-mysql-server v0.18.2-0.20241219174926-e44b780a5716
github.com/dolthub/go-mysql-server v0.19.1-0.20241220232701-999a371fbac0
github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63
github.com/dolthub/swiss v0.1.0
github.com/goccy/go-json v0.10.2
Expand Down
8 changes: 4 additions & 4 deletions go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ github.com/dolthub/fslock v0.0.3 h1:iLMpUIvJKMKm92+N1fmHVdxJP5NdyDK5bK7z7Ba2s2U=
github.com/dolthub/fslock v0.0.3/go.mod h1:QWql+P17oAAMLnL4HGB5tiovtDuAjdDTPbuqx7bYfa0=
github.com/dolthub/go-icu-regex v0.0.0-20241215010122-db690dd53c90 h1:Sni8jrP0sy/w9ZYXoff4g/ixe+7bFCZlfCqXKJSU+zM=
github.com/dolthub/go-icu-regex v0.0.0-20241215010122-db690dd53c90/go.mod h1:ylU4XjUpsMcvl/BKeRRMXSH7e7WBrPXdSLvnRJYrxEA=
github.com/dolthub/go-mysql-server v0.18.2-0.20241219174926-e44b780a5716 h1:NsV88yNOo0hBkEpjkQxQAVM05owX7nQ+KCP6D2K0T0M=
github.com/dolthub/go-mysql-server v0.18.2-0.20241219174926-e44b780a5716/go.mod h1:elfIatfq2fkU5lqTBrTcpL0RcHZOgYPE8EzBD7yQFiY=
github.com/dolthub/go-mysql-server v0.19.1-0.20241220232701-999a371fbac0 h1:aAZFIVisiz2UFVxZ3ok9ncvILRNMPw0cQLgICFJTugs=
github.com/dolthub/go-mysql-server v0.19.1-0.20241220232701-999a371fbac0/go.mod h1:ToNOAVZAJ6iQBpigxYZo3q8JZDRxpI2/VRrtUoZeehI=
github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63 h1:OAsXLAPL4du6tfbBgK0xXHZkOlos63RdKYS3Sgw/dfI=
github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63/go.mod h1:lV7lUeuDhH5thVGDCKXbatwKy2KW80L4rMT46n+Y2/Q=
github.com/dolthub/ishell v0.0.0-20240701202509-2b217167d718 h1:lT7hE5k+0nkBdj/1UOSFwjWpNxf+LCApbRHgnCA17XE=
Expand All @@ -197,8 +197,8 @@ github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81 h1:7/v8q9X
github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81/go.mod h1:siLfyv2c92W1eN/R4QqG/+RjjX5W2+gCTRjZxBjI3TY=
github.com/dolthub/swiss v0.1.0 h1:EaGQct3AqeP/MjASHLiH6i4TAmgbG/c4rA6a1bzCOPc=
github.com/dolthub/swiss v0.1.0/go.mod h1:BeucyB08Vb1G9tumVN3Vp/pyY4AMUnr9p7Rz7wJ7kAQ=
github.com/dolthub/vitess v0.0.0-20241211024425-b00987f7ba54 h1:nzBnC0Rt1gFtscJEz4veYd/mazZEdbdmed+tujdaKOo=
github.com/dolthub/vitess v0.0.0-20241211024425-b00987f7ba54/go.mod h1:1gQZs/byeHLMSul3Lvl3MzioMtOW1je79QYGyi2fd70=
github.com/dolthub/vitess v0.0.0-20241220202600-b18f18d0cde7 h1:w130WLeARGGNYWmhGPugsHXzJEelKKimt3kTWg6/Puk=
github.com/dolthub/vitess v0.0.0-20241220202600-b18f18d0cde7/go.mod h1:1gQZs/byeHLMSul3Lvl3MzioMtOW1je79QYGyi2fd70=
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
Expand Down
6 changes: 5 additions & 1 deletion go/performance/microsysbench/sysbench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,18 @@ func benchmarkSysbenchQuery(b *testing.B, getQuery func(int) string) {
schema, iter, _, err := eng.Query(ctx, getQuery(i))
require.NoError(b, err)
i := 0
buf := sql.NewByteBuffer(16000)
for {
i++
row, err := iter.Next(ctx)
if err != nil {
break
}
outputRow, err := server.RowToSQL(ctx, schema, row, nil)
outputRow, err := server.RowToSQL(ctx, schema, row, nil, buf)
_ = outputRow
if i%128 == 0 {
buf.Reset()
}
}
require.Error(b, io.EOF)
err = iter.Close(ctx)
Expand Down
4 changes: 2 additions & 2 deletions go/store/val/tuple.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"math"

"github.com/dolthub/dolt/go/store/hash"

"github.com/dolthub/dolt/go/store/pool"
)

Expand Down Expand Up @@ -124,7 +123,8 @@ func cloneTuple(pool pool.BuffPool, tup Tuple) Tuple {
func allocateTuple(pool pool.BuffPool, bufSz ByteSize, fields int) (tup Tuple, offs offsets) {
offSz := offsetsSize(fields)
tup = pool.Get(uint64(bufSz + offSz + countSize))

// todo: this causes panics still
//tup = sql.SingletonBuf.GetFull(int(bufSz + offSz + countSize))
writeFieldCount(tup, fields)
offs = offsets(tup[bufSz : bufSz+offSz])

Expand Down

0 comments on commit 049dea8

Please sign in to comment.