Does digest (which is stored in SSD) use for addressing records?

The digest+metadata= Priamry Index, is stored in DRAM and digest is used to address records in SSD. The digets and metadata are also stored in SSD along with data. My question is that, does the digest (which is stored in SSD) use for addressing records? or it is ONLY used for recreating primary index on aerospike restart.

Digest is RIPEMD160 hash of your key, 1byte for your key type and your set name (null default). It is 20bytes. It has no addressing info. 12 specific bits of this digest do indicate the partitionID of the record.

PI in RAM is 64 bytes, which includes this 20 bytes digest, record metadata (LUT, TTL, Generation), 8 bytes that provide all info on which SSD drive, what offset and what size of the record on the SSD (if data on SSD). Different 8 bytes that point to data in RAM if data is stored in RAM. Plus bunch of other bytes for other things in these 64 bytes of PI in RAM.

On SSD, there is a similar 64 bytes overhead per record, which stores the digest, record metatdata - plus some other info - AFAIK, this 64 byte info on SSD per record is only used to recreate the primary index.

1 Like

Thanks, Pgupta. Would you please explain the step by step procedure, how records(data) are accessed by Primary index, like what is the role of digest in addressing records, how locators to a value (value stored in SSD) is accessed etc.

well that could get a bit lengthy… and needs a little bit of background. Suggest you take AS102 course offered by Aerospike.

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.

© 2015 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.