This is an automated email from the ASF dual-hosted git repository.

xiazcy pushed a commit to branch 3.7-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/3.7-dev by this push:
     new cfc1957b96 CTR update go version for docker-compose and fix default 
read/write buffer size for Client and test settings
cfc1957b96 is described below

commit cfc1957b96a1aa01c4803599a35b2a9cc0ad5950
Author: xiazcy <[email protected]>
AuthorDate: Wed Mar 26 13:29:19 2025 -0700

    CTR update go version for docker-compose and fix default read/write buffer 
size for Client and test settings
---
 CHANGELOG.asciidoc                          | 1 +
 gremlin-go/docker-compose.yml               | 2 +-
 gremlin-go/driver/client.go                 | 7 ++-----
 gremlin-go/driver/connection_test.go        | 4 ++--
 gremlin-go/driver/driverRemoteConnection.go | 7 ++-----
 gremlin-go/driver/gorillaTransporter.go     | 6 ++++++
 6 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index f1fbc9a7b6..0cdeeef09c 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -42,6 +42,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Change signature of `hasId(P<Object>)` and `hasValue(P<Object>)` to 
`hasId(P<?>)` and `hasValue(P<?>)`.
 * Improved error message for when `emit()` is used without `repeat()`.
 * Changed `PythonTranslator` to generate snake case step naming instead of 
camel case.
+* Changed `gremlin-go` Client `ReadBufferSize` and `WriteBufferSize` defaults 
to 1048576 (1MB) to align with DriverRemoteConnection.
 * Fixed bug in `IndexStep` which prevented Java serialization due to 
non-serializable lambda usage by creating serializable function classes.
 
 [[release-3-7-3]]
diff --git a/gremlin-go/docker-compose.yml b/gremlin-go/docker-compose.yml
index 07c49a7a15..09d06531ba 100644
--- a/gremlin-go/docker-compose.yml
+++ b/gremlin-go/docker-compose.yml
@@ -45,7 +45,7 @@ services:
 
   gremlin-go-integration-tests:
     container_name: gremlin-go-integration-tests
-    image: golang:1.21
+    image: golang:1.22
     volumes:
       - .:/go_app
       - 
../gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features:/gremlin-test
diff --git a/gremlin-go/driver/client.go b/gremlin-go/driver/client.go
index 5c9dedaa4e..380b556a71 100644
--- a/gremlin-go/driver/client.go
+++ b/gremlin-go/driver/client.go
@@ -79,11 +79,8 @@ func NewClient(url string, configurations ...func(settings 
*ClientSettings)) (*C
                ConnectionTimeout:        connectionTimeoutDefault,
                EnableCompression:        false,
                EnableUserAgentOnConnect: true,
-               // ReadBufferSize and WriteBufferSize specify I/O buffer sizes 
in bytes. If a buffer
-               // size is zero, then a useful default size is used. The I/O 
buffer sizes
-               // do not limit the size of the messages that can be sent or 
received.
-               ReadBufferSize:  0,
-               WriteBufferSize: 0,
+               ReadBufferSize:           readBufferSizeDefault,
+               WriteBufferSize:          writeBufferSizeDefault,
 
                NewConnectionThreshold:       defaultNewConnectionThreshold,
                MaximumConcurrentConnections: runtime.NumCPU(),
diff --git a/gremlin-go/driver/connection_test.go 
b/gremlin-go/driver/connection_test.go
index a4d0dd66f0..677f9bccab 100644
--- a/gremlin-go/driver/connection_test.go
+++ b/gremlin-go/driver/connection_test.go
@@ -64,8 +64,8 @@ func newDefaultConnectionSettings() *connectionSettings {
                connectionTimeout:        connectionTimeoutDefault,
                enableCompression:        false,
                enableUserAgentOnConnect: true,
-               readBufferSize:           0,
-               writeBufferSize:          0,
+               readBufferSize:           readBufferSizeDefault,
+               writeBufferSize:          writeBufferSizeDefault,
        }
 }
 
diff --git a/gremlin-go/driver/driverRemoteConnection.go 
b/gremlin-go/driver/driverRemoteConnection.go
index 8a39c7bcba..a0f155f4c4 100644
--- a/gremlin-go/driver/driverRemoteConnection.go
+++ b/gremlin-go/driver/driverRemoteConnection.go
@@ -85,11 +85,8 @@ func NewDriverRemoteConnection(
                ConnectionTimeout:        connectionTimeoutDefault,
                EnableCompression:        false,
                EnableUserAgentOnConnect: true,
-               // ReadBufferSize and WriteBufferSize specify I/O buffer sizes 
in bytes. The default is 1048576.
-               // If a buffer size is set zero, then the Gorilla websocket 
4096 default size is used. The I/O buffer
-               // sizes do not limit the size of the messages that can be sent 
or received.
-               ReadBufferSize:  1048576,
-               WriteBufferSize: 1048576,
+               ReadBufferSize:           readBufferSizeDefault,
+               WriteBufferSize:          writeBufferSizeDefault,
 
                NewConnectionThreshold:       defaultNewConnectionThreshold,
                MaximumConcurrentConnections: runtime.NumCPU(),
diff --git a/gremlin-go/driver/gorillaTransporter.go 
b/gremlin-go/driver/gorillaTransporter.go
index 6d9d128656..85ac0326df 100644
--- a/gremlin-go/driver/gorillaTransporter.go
+++ b/gremlin-go/driver/gorillaTransporter.go
@@ -33,6 +33,12 @@ const writeDeadlineDefault = 3 * time.Second
 const writeChannelSizeDefault = 100
 const connectionTimeoutDefault = 5 * time.Second
 
+// ReadBufferSize and WriteBufferSize specify I/O buffer sizes in bytes. The 
default is 1048576.
+// If a buffer size is set zero, then the Gorilla websocket 4096 default size 
is used. The I/O buffer
+// sizes do not limit the size of the messages that can be sent or received.
+const readBufferSizeDefault = 1048576
+const writeBufferSizeDefault = 1048576
+
 // Transport layer that uses gorilla/websocket: 
https://github.com/gorilla/websocket
 // Gorilla WebSocket is a widely used and stable Go implementation of the 
WebSocket protocol.
 type gorillaTransporter struct {

Reply via email to