[td-13039]Add api to close file when flushing data out of buffer.

This commit is contained in:
Haojun Liao 2022-02-23 15:54:59 +08:00
parent fb77bb1a0b
commit 1d46e0a70a
2 changed files with 8 additions and 0 deletions

View File

@ -152,6 +152,12 @@ bool isAllDataInMemBuf(const SDiskbasedBuf* pBuf);
*/
void setBufPageDirty(void* pPageInfo, bool dirty);
/**
* Set the compress/ no-compress flag for paged buffer, when flushing data in disk.
* @param pBuf
*/
void setBufPageCompressOnDisk(SDiskbasedBuf* pBuf, bool comp);
/**
* Print the statistics when closing this buffer
* @param pBuf

View File

@ -78,6 +78,8 @@ SLHashObj* tHashInit(int32_t inMemPages, int32_t pageSize, _hash_fn_t fn, int32_
return NULL;
}
setBufPageCompressOnDisk(pHashObj->pBuf, false);
/**
* The number of bits in the hash value, which is used to decide the exact bucket where the object should be located in.
* The initial value is 0.