@@ -23,136 +23,136 @@ include "cachelib/allocator/datastruct/serialize/objects.thrift"
2323// make sure to communicate that with our users.
2424
2525struct CacheAllocatorMetadata {
26- 1: required i64 allocatorVersion , // version of cache alloctor
27- 2: i64 cacheCreationTime = 0 , // time when the cache was created.
28- 3: required i64 accessType = 0 , // default chained alloc
29- 4: required i64 mmType = 0 , // default LRU
30- 5: map<byte, map<byte, i64>> fragmentationSize ,
31- 6: list<byte> compactCachePools ,
32- 7: i64 numPermanentItems ,
33- 8: i64 numChainedParentItems ,
34- 9: i64 numChainedChildItems ,
35- 10: i64 ramFormatVersion = 0 , // format version of ram cache
36- 11: i64 numAbortedSlabReleases = 0 , // number of times slab release is aborted
26+ 1: required i64 allocatorVersion ; // version of cache alloctor
27+ 2: i64 cacheCreationTime = 0 ; // time when the cache was created.
28+ 3: required i64 accessType = 0 ; // default chained alloc
29+ 4: required i64 mmType = 0 ; // default LRU
30+ 5: map<byte, map<byte, i64>> fragmentationSize ;
31+ 6: list<byte> compactCachePools ;
32+ 7: i64 numPermanentItems ;
33+ 8: i64 numChainedParentItems ;
34+ 9: i64 numChainedChildItems ;
35+ 10: i64 ramFormatVersion = 0 ; // format version of ram cache
36+ 11: i64 numAbortedSlabReleases = 0 ; // number of times slab release is aborted
3737}
3838
3939struct NvmCacheMetadata {
40- 1: i64 nvmFormatVersion = 0 ,
41- 2: i64 creationTime = 0 ,
42- 3: bool safeShutDown = false ,
43- 4: bool encryptionEnabled = false ,
44- 5: bool truncateAllocSize = false ,
40+ 1: i64 nvmFormatVersion = 0 ;
41+ 2: i64 creationTime = 0 ;
42+ 3: bool safeShutDown = false ;
43+ 4: bool encryptionEnabled = false ;
44+ 5: bool truncateAllocSize = false ;
4545}
4646
4747struct CompactCacheMetadataObject {
48- 1: required i64 keySize ,
49- 2: required i64 valueSize ,
48+ 1: required i64 keySize ;
49+ 2: required i64 valueSize ;
5050}
5151
5252struct CompactCacheAllocatorObject {
53- 1: required list<i64> chunks ,
54- 2: required CompactCacheMetadataObject ccMetadata ,
53+ 1: required list<i64> chunks ;
54+ 2: required CompactCacheMetadataObject ccMetadata ;
5555}
5656
5757struct CompactCacheAllocatorManagerObject {
58- 1: required map<string, CompactCacheAllocatorObject> allocators ,
58+ 1: required map<string, CompactCacheAllocatorObject> allocators ;
5959}
6060
6161struct MMLruConfig {
62- 1: required i32 lruRefreshTime ,
63- 2: required bool updateOnWrite ,
64- 3: required i32 lruInsertionPointSpec ,
65- 4: bool updateOnRead = true ,
66- 5: bool tryLockUpdate = false ,
67- 6: double lruRefreshRatio = 0.0 ,
62+ 1: required i32 lruRefreshTime ;
63+ 2: required bool updateOnWrite ;
64+ 3: required i32 lruInsertionPointSpec ;
65+ 4: bool updateOnRead = true ;
66+ 5: bool tryLockUpdate = false ;
67+ 6: double lruRefreshRatio = 0.0 ;
6868}
6969
7070struct MMLruObject {
71- 1: required MMLruConfig config ,
71+ 1: required MMLruConfig config ;
7272
7373 // number of evictions for this MM object.
74- 5: i64 evictions = 0 ,
74+ 5: i64 evictions = 0 ;
7575
76- 6: required i64 insertionPoint ,
77- 7: required i64 tailSize ,
78- 8: required DListObject lru ,
79- 9: required i64 compressedInsertionPoint ,
76+ 6: required i64 insertionPoint ;
77+ 7: required i64 tailSize ;
78+ 8: required DListObject lru ;
79+ 9: required i64 compressedInsertionPoint ;
8080}
8181
8282struct MMLruCollection {
83- 1: required map<i32, map<i32, MMLruObject>> pools ,
83+ 1: required map<i32, map<i32, MMLruObject>> pools ;
8484}
8585
8686struct MM2QConfig {
87- 1: required i32 lruRefreshTime ,
88- 2: required bool updateOnWrite ,
89- 3: required i32 hotSizePercent ,
90- 4: required i32 coldSizePercent ,
91- 5: bool updateOnRead = true ,
92- 6: bool tryLockUpdate = false ,
93- 7: bool rebalanceOnRecordAccess = true ,
94- 8: double lruRefreshRatio = 0.0 ,
87+ 1: required i32 lruRefreshTime ;
88+ 2: required bool updateOnWrite ;
89+ 3: required i32 hotSizePercent ;
90+ 4: required i32 coldSizePercent ;
91+ 5: bool updateOnRead = true ;
92+ 6: bool tryLockUpdate = false ;
93+ 7: bool rebalanceOnRecordAccess = true ;
94+ 8: double lruRefreshRatio = 0.0 ;
9595}
9696
9797struct MM2QObject {
98- 1: required MM2QConfig config ,
99- 13: bool tailTrackingEnabled = false ,
98+ 1: required MM2QConfig config ;
99+ 13: bool tailTrackingEnabled = false ;
100100
101101 // number of evictions for this MM object.
102- 11: i64 evictions = 0 ,
102+ 11: i64 evictions = 0 ;
103103
104104 // Warm, hot and cold lrus
105- 12: required MultiDListObject lrus ,
105+ 12: required MultiDListObject lrus ;
106106}
107107
108108struct MM2QCollection {
109- 1: required map<i32, map<i32, MM2QObject>> pools ,
109+ 1: required map<i32, map<i32, MM2QObject>> pools ;
110110}
111111
112112struct MMTinyLFUConfig {
113- 1: required i32 lruRefreshTime ,
114- 2: required bool updateOnWrite ,
115- 3: required i32 windowToCacheSizeRatio ,
116- 4: required i32 tinySizePercent ,
117- 5: bool updateOnRead = true ,
118- 6: bool tryLockUpdate = false ,
119- 7: double lruRefreshRatio = 0.0 ,
113+ 1: required i32 lruRefreshTime ;
114+ 2: required bool updateOnWrite ;
115+ 3: required i32 windowToCacheSizeRatio ;
116+ 4: required i32 tinySizePercent ;
117+ 5: bool updateOnRead = true ;
118+ 6: bool tryLockUpdate = false ;
119+ 7: double lruRefreshRatio = 0.0 ;
120120}
121121
122122struct MMTinyLFUObject {
123- 1: required MMTinyLFUConfig config ,
123+ 1: required MMTinyLFUConfig config ;
124124
125125 // number of evictions for this MM object.
126- 2: i64 evictions = 0 ,
126+ 2: i64 evictions = 0 ;
127127
128128 // Warm, hot and cold lrus
129- 3: required MultiDListObject lrus ,
129+ 3: required MultiDListObject lrus ;
130130}
131131
132132struct MMTinyLFUCollection {
133- 1: required map<i32, map<i32, MMTinyLFUObject>> pools ,
133+ 1: required map<i32, map<i32, MMTinyLFUObject>> pools ;
134134}
135135
136136struct ChainedHashTableObject {
137137 // fields in ChainedHashTable::Config
138- 1: required i32 bucketsPower ,
139- 2: required i32 locksPower ,
140- 3: i64 numKeys ,
138+ 1: required i32 bucketsPower ;
139+ 2: required i32 locksPower ;
140+ 3: i64 numKeys ;
141141
142142 // this magic id ensures on a warm roll, user cannot
143143 // start the cache with a different hash function
144- 4: i32 hasherMagicId = 0 ,
144+ 4: i32 hasherMagicId = 0 ;
145145}
146146
147147struct MMTTLBucketObject {
148- 4: i64 expirationTime ,
149- 5: i64 creationTime ,
150- 6: required DListObject dList ,
148+ 4: i64 expirationTime ;
149+ 5: i64 creationTime ;
150+ 6: required DListObject dList ;
151151}
152152
153153struct TTLBucketCollection {
154- 1: required map<i64, MMTTLBucketObject> buckets ,
155- 2: i64 minEpoch = 0 ,
156- 3: i64 maxTTL = 0 ,
157- 4: i64 interval = 0 ,
154+ 1: required map<i64, MMTTLBucketObject> buckets ;
155+ 2: i64 minEpoch = 0 ;
156+ 3: i64 maxTTL = 0 ;
157+ 4: i64 interval = 0 ;
158158}
0 commit comments