Skip to content

msgpack_ext: added string() function for decimal#525

Open
babyTsakhes wants to merge 1 commit intomasterfrom
babyTsakhes/gh-322-add-string-convertion-for-decimal
Open

msgpack_ext: added string() function for decimal#525
babyTsakhes wants to merge 1 commit intomasterfrom
babyTsakhes/gh-322-add-string-convertion-for-decimal

Conversation

@babyTsakhes
Copy link
Collaborator

Added function for converting decimal type to string, added tests for this function. Fixed function name. Added test for decimal conversion. Added benchmark test confirming that using self-written function is faster than using function from library.

Added #322

 Added function for converting decimal type to string, added tests for this function. Fixed function name. Added test for decimal conversion. Added benchmark test confirming that using self-written function is faster than using function from library.

Added #322
@babyTsakhes
Copy link
Collaborator Author

Compared to the previous PR, I adjusted the tests. Please review it.

@babyTsakhes
Copy link
Collaborator Author

babyTsakhes commented Feb 8, 2026

2026-02-08T15:38:16.0418508Z WARNING: DATA RACE
2026-02-08T15:38:16.0418810Z Write at 0x00c00017a3a8 by goroutine 514:
2026-02-08T15:38:16.0419673Z github.com/tarantool/go-tarantool/v3.(*Future).SetError()
2026-02-08T15:38:16.0423402Z /home/runner/work/go-tarantool/go-tarantool/future.go:91 +0x10b
2026-02-08T15:38:16.0424365Z github.com/tarantool/go-tarantool/v3.(*futureList).clear()
2026-02-08T15:38:16.0425574Z /home/runner/work/go-tarantool/go-tarantool/connection.go:253 +0xdc
2026-02-08T15:38:16.0427128Z github.com/tarantool/go-tarantool/v3.(*Connection).closeConnection()
2026-02-08T15:38:16.0428460Z /home/runner/work/go-tarantool/go-tarantool/connection.go:628 +0xacf
2026-02-08T15:38:16.0429230Z github.com/tarantool/go-tarantool/v3.(*Connection).Close()
2026-02-08T15:38:16.0430198Z /home/runner/work/go-tarantool/go-tarantool/connection.go:429 +0xf7
2026-02-08T15:38:16.0431023Z github.com/tarantool/go-tarantool/v3/test_helpers.isReady.deferwrap1()
2026-02-08T15:38:16.0431688Z /home/runner/work/go-tarantool/go-tarantool/test_helpers/main.go:198 +0x33
2026-02-08T15:38:16.0432404Z runtime.deferreturn()
2026-02-08T15:38:16.0433473Z /opt/hostedtoolcache/go/1.24.12/x64/src/runtime/panic.go:610 +0x5d
2026-02-08T15:38:16.0434460Z github.com/tarantool/go-tarantool/v3/test_helpers.StartTarantool()
2026-02-08T15:38:16.0435422Z /home/runner/work/go-tarantool/go-tarantool/test_helpers/main.go:438 +0x1027
2026-02-08T15:38:16.0436139Z github.com/tarantool/go-tarantool/v3_test.TestGracefulShutdownWithReconnect()
2026-02-08T15:38:16.0437145Z /home/runner/work/go-tarantool/go-tarantool/shutdown_test.go:191 +0xc4
2026-02-08T15:38:16.0437564Z testing.tRunner()
2026-02-08T15:38:16.0438068Z /opt/hostedtoolcache/go/1.24.12/x64/src/testing/testing.go:1792 +0x225
2026-02-08T15:38:16.0438553Z testing.(*T).Run.gowrap1()
2026-02-08T15:38:16.0439002Z /opt/hostedtoolcache/go/1.24.12/x64/src/testing/testing.go:1851 +0x44
2026-02-08T15:38:16.0439385Z
2026-02-08T15:38:16.0439528Z Previous read at 0x00c00017a3a8 by goroutine 529:
2026-02-08T15:38:16.0439911Z github.com/tarantool/go-tarantool/v3.(*Connection).send()
2026-02-08T15:38:16.0440567Z /home/runner/work/go-tarantool/go-tarantool/connection.go:1040 +0x76
2026-02-08T15:38:16.0441241Z github.com/tarantool/go-tarantool/v3.(*Connection).Do()
2026-02-08T15:38:16.0441875Z /home/runner/work/go-tarantool/go-tarantool/connection.go:1243 +0x84
2026-02-08T15:38:16.0442524Z github.com/tarantool/go-tarantool/v3.(*Connection).newWatcherImpl.func1()
2026-02-08T15:38:16.0443509Z /home/runner/work/go-tarantool/go-tarantool/connection.go:1488 +0x429
2026-02-08T15:38:16.0443871Z
2026-02-08T15:38:16.0443975Z Goroutine 514 (running) created at:
2026-02-08T15:38:16.0444234Z testing.(*T).Run()
2026-02-08T15:38:16.0444783Z /opt/hostedtoolcache/go/1.24.12/x64/src/testing/testing.go:1851 +0x8f2
2026-02-08T15:38:16.0445262Z testing.runTests.func1()
2026-02-08T15:38:16.0445754Z /opt/hostedtoolcache/go/1.24.12/x64/src/testing/testing.go:2279 +0x85
2026-02-08T15:38:16.0446223Z testing.tRunner()
2026-02-08T15:38:16.0446645Z /opt/hostedtoolcache/go/1.24.12/x64/src/testing/testing.go:1792 +0x225
2026-02-08T15:38:16.0447130Z testing.runTests()
2026-02-08T15:38:16.0447582Z /opt/hostedtoolcache/go/1.24.12/x64/src/testing/testing.go:2277 +0x96c
2026-02-08T15:38:16.0448028Z testing.(*M).Run()
2026-02-08T15:38:16.0448540Z /opt/hostedtoolcache/go/1.24.12/x64/src/testing/testing.go:2142 +0xeea
2026-02-08T15:38:16.0449009Z github.com/tarantool/go-tarantool/v3_test.runTestMain()
2026-02-08T15:38:16.0449674Z /home/runner/work/go-tarantool/go-tarantool/tarantool_test.go:4025 +0x364
2026-02-08T15:38:16.0450235Z github.com/tarantool/go-tarantool/v3_test.TestMain()
2026-02-08T15:38:16.0450762Z /home/runner/work/go-tarantool/go-tarantool/tarantool_test.go:4029 +0x26
2026-02-08T15:38:16.0451252Z main.main()
2026-02-08T15:38:16.0451499Z _testmain.go:419 +0x171
2026-02-08T15:38:16.0451695Z
2026-02-08T15:38:16.0451859Z Goroutine 529 (running) created at:
2026-02-08T15:38:16.0452247Z github.com/tarantool/go-tarantool/v3.(*Connection).newWatcherImpl()
2026-02-08T15:38:16.0453057Z /home/runner/work/go-tarantool/go-tarantool/connection.go:1456 +0x224
2026-02-08T15:38:16.0453630Z github.com/tarantool/go-tarantool/v3.(*Connection).dial()
2026-02-08T15:38:16.0454157Z /home/runner/work/go-tarantool/go-tarantool/connection.go:520 +0xa64
2026-02-08T15:38:16.0454930Z github.com/tarantool/go-tarantool/v3.(*Connection).connect()
2026-02-08T15:38:16.0455652Z /home/runner/work/go-tarantool/go-tarantool/connection.go:585 +0x98
2026-02-08T15:38:16.0456249Z github.com/tarantool/go-tarantool/v3.Connect()
2026-02-08T15:38:16.0456875Z /home/runner/work/go-tarantool/go-tarantool/connection.go:388 +0xaf0
2026-02-08T15:38:16.0457634Z github.com/tarantool/go-tarantool/v3/test_helpers.isReady()
2026-02-08T15:38:16.0458561Z /home/runner/work/go-tarantool/go-tarantool/test_helpers/main.go:191 +0x144
2026-02-08T15:38:16.0459560Z github.com/tarantool/go-tarantool/v3/test_helpers.StartTarantool()
2026-02-08T15:38:16.0460702Z /home/runner/work/go-tarantool/go-tarantool/test_helpers/main.go:438 +0x1027
2026-02-08T15:38:16.0461347Z github.com/tarantool/go-tarantool/v3_test.TestGracefulShutdownWithReconnect()
2026-02-08T15:38:16.0461970Z /home/runner/work/go-tarantool/go-tarantool/shutdown_test.go:191 +0xc4
2026-02-08T15:38:16.0462343Z testing.tRunner()
2026-02-08T15:38:16.0462985Z /opt/hostedtoolcache/go/1.24.12/x64/src/testing/testing.go:1792 +0x225
2026-02-08T15:38:16.0463546Z testing.(*T).Run.gowrap1()
2026-02-08T15:38:16.0463988Z /opt/hostedtoolcache/go/1.24.12/x64/src/testing/testing.go:1851 +0x44
2026-02-08T15:38:16.0464328Z ==================
2026-02-08T15:38:17.0478025Z 2026/02/08 15:38:17 tarantool: reconnect (0/10) to 127.0.0.1:3014 failed: failed to dial: dial tcp 127.0.0.1:3014: connect: connection refused
2026-02-08T15:38:17.0554564Z 2026/02/08 15:38:17 Tarantool "127.0.0.1:3014" was unexpectedly terminated:
2026-02-08T15:38:18.6611388Z 2026/02/08 15:38:18 tarantool: reconnect (0/10) to 127.0.0.1:3014 failed: failed to dial: dial tcp 127.0.0.1:3014: connect: connection refused
2026-02-08T15:38:18.6689509Z 2026/02/08 15:38:18 Tarantool "127.0.0.1:3014" was unexpectedly terminated:
2026-02-08T15:38:18.6695658Z testing.go:1490: race detected during execution of test
2026-02-08T15:38:18.6696346Z --- FAIL: TestGracefulShutdownWithReconnect (3.23s)
could there be a fluctuation in the test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant