pub fn close_chunk(
        &self,
        db_name: DatabaseName<'_>,
        table_name: impl Into<String>,
        partition_key: impl Into<String>,
        chunk_id: u32,
    ) -> Result<TaskTracker<Job>> {
        let config = self.require_initialized()?;

        let db_name = db_name.to_string();
        let name = DatabaseName::new(&db_name).context(InvalidDatabaseName)?;

        let partition_key = partition_key.into();
        let table_name = table_name.into();

        let db = config
            .db_initialized(&name)
            .context(DatabaseNotFound { db_name: &db_name })?;

        let chunk = db
            .lockable_chunk(&table_name, &partition_key, chunk_id)
            .context(ChunkNotFound)?;

        let guard = chunk.write();

        LockableChunk::move_to_read_buffer(guard).map_err(|e| Error::UnknownDatabaseError {
            source: Box::new(e),
        })
    }
/// Closes a chunk and starts moving its data to the read buffer, as a
/// background job, dropping when complete.
Closes a chunk and starts moving its data to the read buffer, as a
background job, dropping when complete.
Closes a chunk and starts moving its data to the read buffer as a background job dropping when complete .
pub fn close_chunk(
        &self,
        db_name: DatabaseName<'_>,
        table_name: impl Into<String>,
        partition_key: impl Into<String>,
        chunk_id: u32,
    ) -> Result<TaskTracker<Job>> {
        let config = self.require_initialized()?;
        let db_name = db_name.to_string();
        let name = DatabaseName::new(&db_name).context(InvalidDatabaseName)?;
        let partition_key = partition_key.into();
        let table_name = table_name.into();
        let db = config
            .db_initialized(&name)
            .context(DatabaseNotFound { db_name: &db_name })?;
        let chunk = db
            .lockable_chunk(&table_name, &partition_key, chunk_id)
            .context(ChunkNotFound)?;
        let guard = chunk.write();
        LockableChunk::move_to_read_buffer(guard).map_err(|e| Error::UnknownDatabaseError {
            source: Box::new(e),
        })
    }
pub fn close_chunk ( & self , db_name : DatabaseName < ' _ > , table_name : impl Into < String > , partition_key : impl Into < String > , chunk_id : u32 , ) -> Result < TaskTracker < Job > > { let config = self . require_initialized ( ) ? ; let db_name = db_name . to_string ( ) ; let name = DatabaseName :: new ( & db_name ) . context ( InvalidDatabaseName ) ? ; let partition_key = partition_key . into ( ) ; let table_name = table_name . into ( ) ; let db = config . db_initialized ( & name ) . context ( DatabaseNotFound { db_name : & db_name } ) ? ; let chunk = db . lockable_chunk ( & table_name , & partition_key , chunk_id ) . context ( ChunkNotFound ) ? ; let guard = chunk . write ( ) ; LockableChunk :: move_to_read_buffer ( guard ) . map_err ( | e | Error :: UnknownDatabaseError { source : Box :: new ( e ) , } ) }
Closes a chunk and starts moving its data to the read buffer, as a
background job, dropping when complete.
Closes a chunk and starts moving its data to the read buffer as a background job dropping when complete .
&self
db_name
DatabaseName<'_>
table_name
impl Into<String>
partition_key
impl Into<String>
chunk_id
u32
&self
db_name
DatabaseName<'_>
table_name
impl Into<String>
partition_key
impl Into<String>
chunk_id
u32