You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: endpoint.rs
    path of file: ./repos/tikv/components/resolved_ts/src
    
    the code of the file until where you have to start completion: // Copyright 2021 TiKV Project Authors. Licensed under Apache-2.0.

use std::{
    cmp::min,
    collections::HashMap,
    fmt,
    marker::PhantomData,
    sync::{Arc, Mutex, MutexGuard},
    time::Duration,
};

use concurrency_manager::ConcurrencyManager;
use engine_traits::KvEngine;
use futures::channel::oneshot::{channel, Receiver, Sender};
use grpcio::Environment;
use kvproto::{kvrpcpb::LeaderInfo, metapb::Region, raft_cmdpb::AdminCmdType};
use online_con
    
    fn drop(&mut self) {
        let ResolverStatus::Pending {
            locks,
            memory_quota,
            ..
        } = self
        else {
            return;
        };
        if locks.is_empty() {
            return;
        }

        // Free memory quota used by pending locks and unlocks.
        let mut bytes = 0;
        let num_locks = locks.len();
        for lock in locks {
            bytes += lock.approximate_heap_size();
        }
        if bytes > ON_DROP_WARN_HEAP_SIZE {
            warn!("drop huge ResolverStatus";
                "bytes" => bytes,
                "num_locks" => num_locks,
                "memory_quota_in_use" => memory_quota.in_use(),
                "memory_quota_capacity" => memory_quota.capacity(),
            );
        }
        memory_quota.free(bytes);
    }