提交 91a5e17b 编写于 作者: H Hongze Cheng

more code

上级 57bde4f3
......@@ -45,6 +45,8 @@ typedef void (*TArray2Cb)(void *);
#define TARRAY2_SIZE(a) ((a)->size)
#define TARRAY2_ELEM(a, i) ((a)->data[i])
#define TARRAY2_ELEM_PTR(a, i) (&((a)->data[i]))
#define TARRAY2_FIRST(a) ((a)->data[0])
#define TARRAY2_LAST(a) ((a)->data[(a)->size - 1])
static FORCE_INLINE int32_t tarray2_make_room( //
void *arg, // array
......
......@@ -124,17 +124,12 @@ static int32_t open_committer_writer(SCommitter *pCommitter) {
return open_writer_with_new_stt(pCommitter);
}
SRBTreeNode *node = NULL; // tRBTreeMax(&lvl0->sttTree);
if (node == NULL) {
ASSERT(TARRAY2_SIZE(&lvl0->farr) > 0);
STFileObj *fobj = TARRAY2_LAST(&lvl0->farr);
if (fobj->f.stt.nseg >= pCommitter->sttTrigger) {
return open_writer_with_new_stt(pCommitter);
} else {
// STFileObj *fobj = TCONTAINER_OF(node, STFileObj, rbtn);
// if (fobj->f.stt.nseg >= pCommitter->sttTrigger) {
// return open_writer_with_new_stt(pCommitter);
// } else {
// return open_writer_with_exist_stt(pCommitter, &fobj->f);
// }
return 0;
return open_writer_with_exist_stt(pCommitter, &fobj->f);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册