influxdata / influxdata/nginx-influxdb-module

Redesign allocations for line protocol

Open
#20 0 comments 0 reactions 0 assignees View on GitHub
exp/intermediate
Dominant language
C
Stars
40
Forks
15
PR merge metrics
No merged PRs in 30d

Description

I'm very unsure about the usage of the buffer here:

https://github.com/influxdata/nginx-influxdb-module/blob/3ecba971f13b826705a9e6c00348c98c0657611a/src/ngx_http_influxdb_metric.c#L87-L96

I have the feeling that it doesn't handle very well its boundaries, opening this to convert that to a mix of `ngx_palloc` and `ngx_memcpy` that then are used to create an `ngx_str_t`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in src/ngx_http_influxdb_metric.c at lines 87-96 and inspect how the buffer boundaries are handled. Compare the current allocation with the proposed ngx_palloc and ngx_memcpy approach, then ensure the resulting data is represented as an ngx_str_t without boundary errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 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.