How to change write policy on node.js?


#1

When I write a record with an specific bin, all the other bins that were already on that document (namespace/set/key) are deleted.

How can I make that writes only rewrite the bins pushed, and only delete bins if we put bin:null ?

Thanks


#2

Hi Fdnieves,

Could you share the code snippet which results in this behavior. At the highest level it could be due to write policy while writing a record. If the write policy is set to replace the existing record this can happen. But I would like to look at the code snippet to find the exact reason for this behavior.

Thanks


#3

Hi Gayathri,

Thanks for you answer, it seems that there is an error in my code because I made a simple write to the same key several times and it was not removing any bins. Sorry for the trouble.

However I’m still interested in that policy, do you know how to change write policy or other many policies that Aerospike can handle? Seems that there is Java documentation about how to change policies but not NodeJS.

Thanks!


#4

Hi

Here is the documentation about policies available in nodejs API. Please let us know if you need any more information.

Thanks