Bin metadata is stored on each record - so if you delete a bin in a record, metadata on the bin for that record is absent in the new version of the record. You must explicitly delete the secondary index. BTW, you can delete secondary index on existing bins, before deleting the bins.
Okay. I understand that -
Deleting a bin from a record removes bin metadata only from that record. But I guess when the bin has been deleted from all the records, the bin-name is still present in the list of 32k bin names until a cold restart. Am i right?
On secondary indexes:
If i delete a bin from a record, its entry from the secondary index is removed automatically?
If the bin has been deleted from all the records its secondary index would still exist but would be empty?
Deleting a secondary index itself (irrespective of weather the bin has been removed from all the records or not) is possible?
I will answer to the best of my understanding… but you can easily test this on a single node instance.
Specifically:
"I guess when the bin has been deleted from all the records, the bin-name is still present in the list of 32k bin names until a cold restart. Am i right? "- Not quite - AQL> show bins … the bin name will still be present as used if you had declared a secondary index on that bin and did not delete the secondary index before cold starting the node. So delete the secondary index - AQL> drop index … before cold starting the node.
If i delete a bin from a record, its entry from the secondary index is removed automatically? ==> Yes
If the bin has been deleted from all the records its secondary index would still exist but would be empty? ==> yes, but I would reword as: the secondary index tied to the bin name and data type is still defined with no entries in it
Deleting a secondary index itself (irrespective of weather the bin has been removed from all the records or not) is possible? – Yes, frees up the RAM used by the secondary index tree.