fix lru cache handle field order (#21435)
For LRUHandle, all fields should be put ahead of key_data. The LRUHandle is allocated using malloc and starting from field key_data is for key data.
This commit is contained in:
@ -254,8 +254,8 @@ struct LRUHandle {
|
||||
uint32_t hash; // Hash of key(); used for fast sharding and comparisons
|
||||
CachePriority priority = CachePriority::NORMAL;
|
||||
MemTrackerLimiter* mem_tracker;
|
||||
char key_data[1]; // Beginning of key
|
||||
LRUCacheType type;
|
||||
char key_data[1]; // Beginning of key
|
||||
|
||||
CacheKey key() const {
|
||||
// For cheaper lookups, we allow a temporary Handle object
|
||||
|
||||
Reference in New Issue
Block a user