Skip to content

Fix bulking behavior in gremlin-go for TP 4.0#3397

Merged
xiazcy merged 4 commits intomasterfrom
go-bulk-fix
May 1, 2026
Merged

Fix bulking behavior in gremlin-go for TP 4.0#3397
xiazcy merged 4 commits intomasterfrom
go-bulk-fix

Conversation

@xiazcy
Copy link
Copy Markdown
Contributor

@xiazcy xiazcy commented Apr 23, 2026

Fixed gremlin-go in TP 4.0 to properly handle bulked result with bulkResults request option. Bulk counts is now preserved inside Traverser objects, and lazily unroll during traversal iteration, matching Java/Python/.NET/JS behavior.

Also updated the relevant docs, and captured the fact that all GLVs will set "bulkResults" to true through DRC, overriding the server's default to not bulk.

VOTE +1

Copy link
Copy Markdown
Contributor

@GumpacG GumpacG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VOTE +1

totalBulk++
}
}
assert.Equal(t, int64(5), totalBulk)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a check for the amount of traversers as that would confirm that it is getting bulked properly.

Should there be a test for when SetBulkResults(false) where an error should be returned since there are no traversers?

Comment thread gremlin-go/driver/requestOptions.go Outdated
Comment thread gremlin-go/driver/traversal_test.go Outdated
@Cole-Greer
Copy link
Copy Markdown
Contributor

Other than the existing comments from Guian and Ken, everything looks good to me.

VOTE +1 (pending comment resolutions)

@kenhuuu
Copy link
Copy Markdown
Contributor

kenhuuu commented May 1, 2026

VOTE +1

@xiazcy xiazcy merged commit 0531cbb into master May 1, 2026
38 of 40 checks passed
@xiazcy xiazcy deleted the go-bulk-fix branch May 1, 2026 22:58
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.

4 participants