Skip to content

Commit cfc1957

Browse files
committed
CTR update go version for docker-compose and fix default read/write buffer size for Client and test settings
1 parent cbafd31 commit cfc1957

6 files changed

Lines changed: 14 additions & 13 deletions

File tree

CHANGELOG.asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
4242
* Change signature of `hasId(P<Object>)` and `hasValue(P<Object>)` to `hasId(P<?>)` and `hasValue(P<?>)`.
4343
* Improved error message for when `emit()` is used without `repeat()`.
4444
* Changed `PythonTranslator` to generate snake case step naming instead of camel case.
45+
* Changed `gremlin-go` Client `ReadBufferSize` and `WriteBufferSize` defaults to 1048576 (1MB) to align with DriverRemoteConnection.
4546
* Fixed bug in `IndexStep` which prevented Java serialization due to non-serializable lambda usage by creating serializable function classes.
4647
4748
[[release-3-7-3]]

gremlin-go/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ services:
4545

4646
gremlin-go-integration-tests:
4747
container_name: gremlin-go-integration-tests
48-
image: golang:1.21
48+
image: golang:1.22
4949
volumes:
5050
- .:/go_app
5151
- ../gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features:/gremlin-test

gremlin-go/driver/client.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,8 @@ func NewClient(url string, configurations ...func(settings *ClientSettings)) (*C
7979
ConnectionTimeout: connectionTimeoutDefault,
8080
EnableCompression: false,
8181
EnableUserAgentOnConnect: true,
82-
// ReadBufferSize and WriteBufferSize specify I/O buffer sizes in bytes. If a buffer
83-
// size is zero, then a useful default size is used. The I/O buffer sizes
84-
// do not limit the size of the messages that can be sent or received.
85-
ReadBufferSize: 0,
86-
WriteBufferSize: 0,
82+
ReadBufferSize: readBufferSizeDefault,
83+
WriteBufferSize: writeBufferSizeDefault,
8784

8885
NewConnectionThreshold: defaultNewConnectionThreshold,
8986
MaximumConcurrentConnections: runtime.NumCPU(),

gremlin-go/driver/connection_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ func newDefaultConnectionSettings() *connectionSettings {
6464
connectionTimeout: connectionTimeoutDefault,
6565
enableCompression: false,
6666
enableUserAgentOnConnect: true,
67-
readBufferSize: 0,
68-
writeBufferSize: 0,
67+
readBufferSize: readBufferSizeDefault,
68+
writeBufferSize: writeBufferSizeDefault,
6969
}
7070
}
7171

gremlin-go/driver/driverRemoteConnection.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,8 @@ func NewDriverRemoteConnection(
8585
ConnectionTimeout: connectionTimeoutDefault,
8686
EnableCompression: false,
8787
EnableUserAgentOnConnect: true,
88-
// ReadBufferSize and WriteBufferSize specify I/O buffer sizes in bytes. The default is 1048576.
89-
// If a buffer size is set zero, then the Gorilla websocket 4096 default size is used. The I/O buffer
90-
// sizes do not limit the size of the messages that can be sent or received.
91-
ReadBufferSize: 1048576,
92-
WriteBufferSize: 1048576,
88+
ReadBufferSize: readBufferSizeDefault,
89+
WriteBufferSize: writeBufferSizeDefault,
9390

9491
NewConnectionThreshold: defaultNewConnectionThreshold,
9592
MaximumConcurrentConnections: runtime.NumCPU(),

gremlin-go/driver/gorillaTransporter.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ const writeDeadlineDefault = 3 * time.Second
3333
const writeChannelSizeDefault = 100
3434
const connectionTimeoutDefault = 5 * time.Second
3535

36+
// ReadBufferSize and WriteBufferSize specify I/O buffer sizes in bytes. The default is 1048576.
37+
// If a buffer size is set zero, then the Gorilla websocket 4096 default size is used. The I/O buffer
38+
// sizes do not limit the size of the messages that can be sent or received.
39+
const readBufferSizeDefault = 1048576
40+
const writeBufferSizeDefault = 1048576
41+
3642
// Transport layer that uses gorilla/websocket: https://github.com/gorilla/websocket
3743
// Gorilla WebSocket is a widely used and stable Go implementation of the WebSocket protocol.
3844
type gorillaTransporter struct {

0 commit comments

Comments
 (0)