Skip to content

Commit

Permalink
auto-merge-from-master
Browse files Browse the repository at this point in the history
  • Loading branch information
dockerzhang committed Dec 16, 2024
2 parents 5a4b83b + 64b3531 commit 61c240e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"strconv"
"time"

"github.com/gofrs/uuid"
"github.com/google/uuid"

"github.com/panjf2000/gnet/v2"
"go.uber.org/atomic"
Expand Down Expand Up @@ -329,7 +329,7 @@ func (w *worker) sendAsync(ctx context.Context, msg Message, callback Callback)
}

func (w *worker) buildBatchID() string {
u, err := uuid.NewV4()
u, err := uuid.NewRandom()
if err != nil {
return w.indexStr + ":" + strconv.FormatInt(time.Now().UnixNano(), 10)
}
Expand Down
2 changes: 1 addition & 1 deletion inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-golang/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ toolchain go1.21.4
require (
github.com/bwmarrin/snowflake v0.3.0
github.com/go-resty/resty/v2 v2.13.1
github.com/gofrs/uuid v4.4.0+incompatible
github.com/google/uuid v1.6.0
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c
github.com/panjf2000/gnet/v2 v2.5.7
github.com/prometheus/client_golang v1.19.1
Expand Down
4 changes: 2 additions & 2 deletions inlong-sdk/dataproxy-sdk-twins/dataproxy-sdk-golang/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-resty/resty/v2 v2.13.1 h1:x+LHXBI2nMB1vqndymf26quycC4aggYJ7DECYbiz03g=
github.com/go-resty/resty/v2 v2.13.1/go.mod h1:GznXlLxkq6Nh4sU59rPmUw3VtgpO3aS96ORAI6Q7d+0=
github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA=
github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"log"

"github.com/bwmarrin/snowflake"
"github.com/gofrs/uuid"
"github.com/google/uuid"
"github.com/zentures/cityhash"
)

Expand All @@ -43,12 +43,12 @@ func init() {

// UInt64UUID generates an uint64 UUID
func UInt64UUID() (uint64, error) {
guid, err := uuid.NewV4()
guid, err := uuid.NewRandom()
if err != nil {
return 0, err
}

bytes := guid.Bytes()
bytes := guid[:]
length := len(bytes)
return cityhash.CityHash64WithSeeds(bytes, uint32(length), 13329145742295551469, 7926974186468552394), nil
}
Expand Down

0 comments on commit 61c240e

Please sign in to comment.