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

Add none compression #1208

Merged
merged 5 commits into from
Nov 16, 2021
Merged

Add none compression #1208

merged 5 commits into from
Nov 16, 2021

Conversation

shikhar
Copy link
Collaborator

@shikhar shikhar commented Nov 16, 2021

If none of the {lz4,brotli,snappy}-compression feature flags are present, Compressor::None is used.

It just copies the input slice to destination vector. The copy may be avoidable with some Compressor API changes, but left to a future optimization if it's even worthwhile - someone exercising the docstore will probably enable compression.

src/store/compressors.rs Outdated Show resolved Hide resolved
src/store/compressors.rs Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2021

Codecov Report

Merging #1208 (1a3db4c) into main (bbc0a2e) will increase coverage by 0.00%.
The diff coverage is 92.30%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1208   +/-   ##
=======================================
  Coverage   94.06%   94.06%           
=======================================
  Files         205      205           
  Lines       34504    34514   +10     
=======================================
+ Hits        32457    32467   +10     
  Misses       2047     2047           
Impacted Files Coverage Δ
src/store/compressors.rs 87.23% <88.88%> (+6.74%) ⬆️
src/store/mod.rs 99.18% <100.00%> (+0.01%) ⬆️
src/directory/file_watcher.rs 96.69% <0.00%> (-3.31%) ⬇️
src/postings/stacker/expull.rs 93.88% <0.00%> (+0.43%) ⬆️
src/directory/watch_event_router.rs 96.18% <0.00%> (+0.76%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bbc0a2e...1a3db4c. Read the comment docs.

Copy link
Collaborator

@fulmicoton fulmicoton left a comment

Choose a reason for hiding this comment

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

See the minor comments

@shikhar shikhar changed the title Add Compressor::NoOp Add none compression Nov 16, 2021
@fulmicoton fulmicoton merged commit 72cef12 into quickwit-oss:main Nov 16, 2021
@shikhar shikhar deleted the no-compress branch November 16, 2021 01:59
@PSeitz
Copy link
Contributor

PSeitz commented Nov 16, 2021

When would someone want not any compressor?

@fulmicoton
Copy link
Collaborator

Removing dependencies. @shikhar only uses fast field, probably like a foreign key. I encounterred the same need in the past when working on a small index and web assembly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants