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

Support Adaptive Lightweight Compression Algorithm #8903

Merged
merged 29 commits into from
Jul 8, 2024

Conversation

Lloyd-Pottiger
Copy link
Contributor

@Lloyd-Pottiger Lloyd-Pottiger commented Apr 7, 2024

What problem does this PR solve?

Issue Number: close #8982

Problem Summary:

What is changed and how it works?

Support Adaptive Lightweight Compression Algorithm

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Apr 7, 2024
Copy link
Contributor

ti-chi-bot bot commented Apr 17, 2024

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 17, 2024
@Lloyd-Pottiger Lloyd-Pottiger mentioned this pull request Apr 19, 2024
12 tasks
@Lloyd-Pottiger Lloyd-Pottiger force-pushed the support-lightweight-algo branch 2 times, most recently from 599220e to 1c0d983 Compare May 8, 2024 15:46
@Lloyd-Pottiger Lloyd-Pottiger removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 8, 2024
dbms/src/IO/Compression/EncodingUtil.h Outdated Show resolved Hide resolved
dbms/src/IO/Compression/EncodingUtil.h Outdated Show resolved Hide resolved
Copy link
Member

@CalvinNeo CalvinNeo left a comment

Choose a reason for hiding this comment

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

lgtm

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels May 22, 2024
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jul 8, 2024
Copy link
Contributor

ti-chi-bot bot commented Jul 8, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-05-22 03:45:44.845025321 +0000 UTC m=+2229698.602160892: ☑️ agreed by CalvinNeo.
  • 2024-07-08 03:14:26.300497354 +0000 UTC m=+240963.535731467: ☑️ agreed by JinheLin.

@JaySon-Huang
Copy link
Contributor

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 8, 2024
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Comment on lines 260 to 262
memcpy(dest, src, sizeof(T));
if (unlikely(source_size <= sizeof(T)))
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

The check of source_size > sizeof(T) should be done before memcpy?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

== here, fixed.

The following make sure source_size >= sizeof(T).

void CompressionCodecDeltaFOR::doDecompressData(
    const char * source,
    UInt32 source_size,
    char * dest,
    UInt32 uncompressed_size) const
{
    if (unlikely(source_size < 2))
        throw Exception(
            ErrorCodes::CANNOT_DECOMPRESS,
            "Cannot decompress DeltaFor-encoded data. File has wrong header");

Lloyd-Pottiger and others added 3 commits July 8, 2024 12:51
Signed-off-by: Lloyd-Pottiger <yan1579196623@gmail.com>
Copy link
Contributor

@JaySon-Huang JaySon-Huang left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

ti-chi-bot bot commented Jul 8, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CalvinNeo, JaySon-Huang, JinheLin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [CalvinNeo,JaySon-Huang,JinheLin]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@JaySon-Huang
Copy link
Contributor

/hold
cancel

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 8, 2024
@ti-chi-bot ti-chi-bot bot merged commit 1ad8a21 into pingcap:master Jul 8, 2024
5 checks passed
@Lloyd-Pottiger Lloyd-Pottiger deleted the support-lightweight-algo branch July 8, 2024 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Adaptively Decide Compression Algorithm for integers data type
4 participants