MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ~SSDHashKV

Method ~SSDHashKV

tensorflow/core/framework/embedding/ssd_hash_kv.h:240–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

238 }
239
240 ~SSDHashKV() override {
241 if (buffer_cur_ > 0) {
242 if (!is_async_compaction_) {
243 emb_files_[current_version_]->Write(write_buffer_,
244 buffer_cur_ * val_len_);
245 } else {
246 emb_files_[evict_version_]->Write(write_buffer_,
247 buffer_cur_ * val_len_);
248 mutex_lock l(shutdown_mu_);
249 shutdown_ = true;
250 // Need last compaction or not???
251 // CompactionAsync();
252 delete compaction_thread_;
253 }
254 buffer_cur_ = 0;
255 }
256 for (auto it : emb_files_) {
257 if (!it->IsDeleted()) {
258 it->DeleteFile();
259 }
260 delete it;
261 }
262 DeallocateEmbPositions();
263 delete[] write_buffer_;
264 delete[] key_buffer_;
265 }
266
267 Status UpdateFlushStatus() {
268 for (int i = 0; i < buffer_cur_; ++i) {

Callers

nothing calls this directly

Calls 3

IsDeletedMethod · 0.80
WriteMethod · 0.45
DeleteFileMethod · 0.45

Tested by

no test coverage detected