Icinga / Icinga/icinga2

Buffer is flushed🚽 after every single Redis query

Open
#10,100 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/icingadb good first issue
Dominant language
C++
Stars
2.2k
Forks
616
Avg merge
5d 6h
Merged PRs (30d)
10

Description

Describe the bug

Even given a bulk of queries, RedisConnection#WriteItem() loops them calling WriteOne().
The latter calls WriteRESP() and async_flush().

Expected behavior

Write everything queued, flush once.

Your Environment

c5c7925d8

Additional context

While more async I/O may even reduce mutex contention, this is not what our buffered streams are for.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at RedisConnection#WriteItem() and trace its calls to WriteOne(), WriteRESP(), and async_flush(). Confirm how queued bulk queries are written, then make the completed behavior flush once after all queued writes rather than after each query.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, redis
Domain
backend, databases, performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.