PLANNED MAINTENANCE

Hello, DataStax Community!

We want to make you aware of a few operational updates which will be carried out on the site. We are working hard to streamline the login process to integrate with other DataStax resources. As such, you will soon be prompted to update your password. Please note that your username will remain the same.

As we work to improve your user experience, please be aware that login to the DataStax Community will be unavailable for a few hours on:

  • Wednesday, July 15 16:00 PDT | 19:00 EDT | 20:00 BRT
  • Thursday, July 16 00:00 BST | 01:00 CEST | 04:30 IST | 07:00 CST | 09:00 AEST

For more info, check out the FAQ page. Thank you for being a valued member of our community.


question

papishetty.praneeth_19978 avatar image
papishetty.praneeth_19978 asked ·

Why does the Node.js driver report "consistency=6" in the logs when we use LOCAL_QUORUM?

We are using nodejs driver to connect to cassandra and we use the retry policy when localquorum cannot be satisfied.

when there is a node down and this policy kicks in, the log says the consistency 6 . here is the example log message .

"retrying query with lower consistency" retryCount=3 consistency=6 required=2 alive=1

retry policy

https://github.com/datastax/nodejs-driver/blob/f9b3767e2357442aae43dc0c7744b382d529ec22/lib/policies/retry.js#L41

the enum configured for localquorum

https://github.com/datastax/nodejs-driver/blob/f9b3767e2357442aae43dc0c7744b382d529ec22/lib/types/index.d.ts#L33

Can someone please explain why the consistency is enumed.

Thanks

drivers
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

jorgebg avatar image
jorgebg answered ·

Consistency level is represented in JavaScript as an object with names and a code, as enums are not supported natively in JavaScript.


If you are reporting the consistency level to your log system, you can use consistencyToString object to represent it as a string: https://docs.datastax.com/en/developer/nodejs-driver/4.5/api/module.types/#consistency-tostring

1 comment Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Thank you

0 Likes 0 · ·