@@ -111,6 +111,9 @@ pub struct EnvVarsStore {
111111 /// blocks) than its history limit. The default value is 1.2 and the
112112 /// value must be at least 1.01
113113 pub history_slack_factor : f64 ,
114+ /// For how many prune runs per deployment to keep status information.
115+ /// Set by `GRAPH_STORE_HISTORY_KEEP_STATUS`. The default is 5
116+ pub prune_keep_history : usize ,
114117 /// How long to accumulate changes into a batch before a write has to
115118 /// happen. Set by the environment variable
116119 /// `GRAPH_STORE_WRITE_BATCH_DURATION` in seconds. The default is 300s.
@@ -184,6 +187,7 @@ impl TryFrom<InnerStore> for EnvVarsStore {
184187 rebuild_threshold : x. rebuild_threshold . 0 ,
185188 delete_threshold : x. delete_threshold . 0 ,
186189 history_slack_factor : x. history_slack_factor . 0 ,
190+ prune_keep_history : x. prune_keep_status ,
187191 write_batch_duration : Duration :: from_secs ( x. write_batch_duration_in_secs ) ,
188192 write_batch_size : x. write_batch_size * 1_000 ,
189193 create_gin_indexes : x. create_gin_indexes ,
@@ -257,6 +261,8 @@ pub struct InnerStore {
257261 delete_threshold : ZeroToOneF64 ,
258262 #[ envconfig( from = "GRAPH_STORE_HISTORY_SLACK_FACTOR" , default = "1.2" ) ]
259263 history_slack_factor : HistorySlackF64 ,
264+ #[ envconfig( from = "GRAPH_STORE_HISTORY_KEEP_STATUS" , default = "5" ) ]
265+ prune_keep_status : usize ,
260266 #[ envconfig( from = "GRAPH_STORE_WRITE_BATCH_DURATION" , default = "300" ) ]
261267 write_batch_duration_in_secs : u64 ,
262268 #[ envconfig( from = "GRAPH_STORE_WRITE_BATCH_SIZE" , default = "10000" ) ]
0 commit comments