mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-30 00:32:30 +08:00
Fix memory issue on Infinity 0.6.15 (#12258)
### What problem does this PR solve? 1. Remove unused columns 2. Check the empty database 3. Switch on the order by expression ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --------- Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@ -168,7 +168,7 @@ class MessageService:
|
||||
order_by = OrderByExpr()
|
||||
order_by.desc("valid_at")
|
||||
|
||||
res = settings.msgStoreConn.search(
|
||||
res, count = settings.msgStoreConn.search(
|
||||
select_fields=["memory_id", "content", "content_embed"],
|
||||
highlight_fields=[],
|
||||
condition={},
|
||||
@ -177,8 +177,10 @@ class MessageService:
|
||||
offset=0, limit=2048*len(memory_ids),
|
||||
index_names=index_names, memory_ids=memory_ids, agg_fields=[], hide_forgotten=False
|
||||
)
|
||||
if not res:
|
||||
|
||||
if count == 0:
|
||||
return {}
|
||||
|
||||
docs = settings.msgStoreConn.get_fields(res, ["memory_id", "content", "content_embed"])
|
||||
size_dict = {}
|
||||
for doc in docs.values():
|
||||
|
||||
Reference in New Issue
Block a user