Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support decode gzip if influxdb write specify it #3494

Merged
merged 5 commits into from Mar 14, 2024

Conversation

tisonkun
Copy link
Contributor

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

This closes #3487.

What's changed and what's your intention?

Tested locally. But I'd appreciate it if you can tell me how to add a test coverage in CI ...

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

Signed-off-by: tison <wander4096@gmail.com>
@tisonkun tisonkun self-assigned this Mar 12, 2024
@github-actions github-actions bot added the Doc not needed This PR do not impact docs label Mar 12, 2024
src/servers/src/http/influxdb.rs Outdated Show resolved Hide resolved
src/servers/src/http/influxdb.rs Outdated Show resolved Hide resolved
src/servers/src/http/influxdb.rs Outdated Show resolved Hide resolved
Signed-off-by: tison <wander4096@gmail.com>
Copy link

codecov bot commented Mar 13, 2024

Codecov Report

Attention: Patch coverage is 93.75000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 84.92%. Comparing base (fb4da05) to head (8013619).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3494      +/-   ##
==========================================
- Coverage   85.33%   84.92%   -0.41%     
==========================================
  Files         903      904       +1     
  Lines      149873   150172     +299     
==========================================
- Hits       127887   127538     -349     
- Misses      21986    22634     +648     

@tisonkun
Copy link
Contributor Author

No. tower's version is another issue.

@killme2008 I suppose we move the better middleware layer impl a follow-up. It seems much more complex and involves a few deps version issue.

Signed-off-by: tison <wander4096@gmail.com>
@tisonkun
Copy link
Contributor Author

Finally get it work with:

            .layer(
                ServiceBuilder::new()
                    .layer(HandleErrorLayer::new(handle_error))
                    .layer(RequestDecompressionLayer::new()),
            )

PTAL @killme2008 @shuiyisong

Signed-off-by: tison <wander4096@gmail.com>
@tisonkun
Copy link
Contributor Author

However, the existing middleware doesn't handle case for header value (That is, if the client use Content-Encoding: GZIP, it will fail). I suppose it's a convention to follow.

Copy link
Contributor

@killme2008 killme2008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! LGTM

@killme2008 killme2008 mentioned this pull request Mar 14, 2024
4 tasks
@evenyag evenyag changed the title feat: support dedoce gzip if influxdb write specify it feat: support decode gzip if influxdb write specify it Mar 14, 2024
Copy link
Contributor

@evenyag evenyag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@evenyag evenyag added this pull request to the merge queue Mar 14, 2024
Merged via the queue into GreptimeTeam:main with commit 61f0703 Mar 14, 2024
21 checks passed
@tisonkun tisonkun deleted the gzip branch March 14, 2024 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Doc not needed This PR do not impact docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compatible with InfluxDB CLI - Support GZIP compression
3 participants