We had a long, heated discussion about this, so capturing some of this in this email.
First, we all agree that this should be a "Tiered Cache", and not specific to SSD. So code and configs etc. should properly reflect that.
Secondly, I obviously dislike the idea of storing some disk configs in storage.config, and some in records.config. I understand making this change is a big deal for Taobao, so I'm offering a compromise:
1) We add support for storage.config, with a new tag similar to the tag
TS-1728 adds for volume identification. Maybe something like
Where tier=1 is "SSD" (or whatever fast storage device you have, what currently gets configured in records.config) and tier=2 is all other disks (what's currently in storage.config).
2) In addition, we keep the records.config setting in mgmt/RecordsConfig.cc, and make it "populate" the tier=1 disks. This option will not be documented, or added to records.config.default.in. It's purely there to allow Taobao to merge with upstream and not having to maintain a fork. Long term, I'd imagine this config goes away, as we refactor all the configuraitons into a unified "VirtualHost" conceptual config.
James and I (and hopefully John too) will continue reviewing this complicated piece of code in the next week or two. The goal is to land this for v3.3.3, which is Mid-May. We do need to make sure this also doesn't conflict with
TS-1728, which also should be landed for v3.3.3.