joao-r-reis commented on issue #1904: URL: https://github.com/apache/cassandra-gocql-driver/issues/1904#issuecomment-3111604671
>> ... While Cassandra returns exactly PageSize items (except for last page) in a page currently, the protocol authors explicitly reserved the right to return smaller or larger amount of items in a page for performance reasons, so don't rely on the page having the exact count of items. > I don't know how to make sense of this, frankly. It says that Cassandra will return exactly PageSize items (except for last page) but simultaneously says not to rely on the page having the exact count of items and that the authors reserve the right to return fewer or more items per page. The Cassandra implementation of the native protocol supposedly returns exactly PageSize items (I haven't verified this but it's what the documentation is referring to even though it doesn't mention exactly which C* versions) but the protocol itself specifies that fewer than PageSize items can be returned by the server so in theory this behavior can differ between Cassandra versions because that would still be a correct implementation according to the protocol spec. The java driver documentation goes further and explicitly tells the user not to "assume" that those PageSize items will be returned even if the server side implementation will have that outcome for a particular Cassandra version because the native protocol spec specifies that the server can return less items than those requested via the PageSize field. This is a good practice that every developer using Cassandra should follow and is in line with gocql states in its documentation even if gocql mentions the detail that Cassandra might implement the protocol in a way that those PageSize items will always be returned. The statements aren't contradictory but users who aren't aware of the native protocol spec might be a bit confused by them, we can probably reword them to be more clear. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
