Closed sg20180546 closed 1 year ago
@sg20180546 : I think we should not force gc if the user has not requested it, but rather make sure that the background gc thread frees up enough space to sustain the user writes. To do this properly we would have to rate-limit the user writes to make sure the background gc process will free up enough space (as the user writes would likely out-compete the gc thread for disk bandwidth)
In some IO Intensive situation, ZoneFile::AllocateNewZone returns IOStatus::NoSpace. but rather than return directly Nospace error and shutdown database, maybe there should be one more chance to GCWorker collect extents and make appropriate zone to allocate data (i think) In my research environment, i change AllocateNewZone like this :+1:
Parameter for GCWorker is flag for run only once(loop). I make a member variable ZenFS* in ZoneFile and Call GCWorker, but this may be messy code. (if maintainer do not thinks like that, i could push it)
Anyway, there have to be one more chance for zone allocation.