Skip to content

[BUG] Loop query db in func batchGetCache2 #3301

Open
@xuzhijvn

Description

@xuzhijvn

OpenIM Server Version

v3.8.3-patch.4

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Source Code Deployment

Bug Description and Steps to Reproduce

Func batchGetCache2 (pkg/common/storage/cache/redis/batch.go) has a bug in loop querying the database:

  1. If a large amount of data is fetched each time (e.g., loading 200 messages at once), the loop querying the database may cause long delays.
  2. If the concurrency is high, it can easily overload the DB.

Tips: RocksCache’s default empty expiration is 60s, so many empty results may penetrate to the DB.

Screenshots Link

Image

Metadata

Metadata

Assignees

Labels

bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions