Encoded buffer size is not correctly calculated when defaultTimestamp is set and use V4 protocol

Description

In com.datastax.driver.core.Requests.QueryProtocolOptions.encodedSize(ProtocolVersion) method implementation, it ignores the defaultTimestamp size when using V4 or higher version.

Environment

None

Pull Requests

None

Activity

Show:
Andy Tolbert
February 14, 2018, 7:59 PM

Thanks for reporting this !

This is definitely a problem, i'll work to fix it. Fortunately encodedSize is only used for requesting the initial capacity of the ByteBuf used to allocate the payload and write it (code), so client timestamps still work, its just that its not very optimal since we are requesting a ByteBuf smaller than we need, which probably creates some inefficiencies. I changed the target for our next release (3.5.0).

Fixed

Assignee

Unassigned

Reporter

Roger Chen

Labels

None

PM Priority

None

Reproduced in

None

Affects versions

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Priority

Minor
Configure