OleksiienkoMykyta commented on issue #1657:
URL: 
https://github.com/apache/cassandra-gocql-driver/issues/1657#issuecomment-2754165973

   > We had a longer discussion in slack (thread 
[here](https://the-asf.slack.com/archives/C05LPRVNZV1/p1742868064711009)) and I 
think the conclusion is that we need some kind of way for users to opt in to 
this behavior because otherwise users that rely on this behavior will not be 
able to upgrade their driver until they rewrite every empty timestamp value on 
their databases.
   
   As mentioned, James, we can add a script to convert time values from 
[]byte{} to BigInt, but maybe we can add a config option as well, and handle it 
under the hood? This option will be deleted with the old behavior. So you can 
migrate to the new version instantly, just run the script once, and use it with 
the new behavior, or just use the config option to have some time for 
migration, but using v2.
   It may seem to be overhead, adding a config option just as a workaround, but 
I think it will help users to migrate smoothly, and give more time to fit 
changes to their applications.
   Although, looks like an odd behavior in Cassandra. Looks like it should 
return an error instead of setting an empty value.
   According to the proto spec, it should have 8 bytes, but it handles 0 as 
well(https://github.com/apache/cassandra/blob/51e01a3862afc1ebaffd765b2490a581461c3f14/doc/native_protocol_v5.spec#L1160).
 Sounds like a bug.
   What do you think?


-- 
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]

Reply via email to