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

CASSGO-32 move lz4 compressor to lz4 package within the gocql module #1842

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

OleksiienkoMykyta
Copy link
Contributor

@OleksiienkoMykyta OleksiienkoMykyta commented Nov 18, 2024

This PR should be reviewed right after #1822 is merged.

@joao-r-reis
Copy link
Contributor

I assume you want this to be looked at after the v5 PR is merged? Since it contains all of those commits.

@OleksiienkoMykyta
Copy link
Contributor Author

I assume you want this to be looked at after the v5 PR is merged? Since it contains all of those commits.

Yes, I am sorry that I didn't add the description earlier, I think it should be in WIP until the v5 PR is merged

@OleksiienkoMykyta OleksiienkoMykyta changed the title Cassgo-32 lz4 has been moved into gocql package WIP-Cassgo-32 lz4 has been moved into gocql package Nov 20, 2024
@joao-r-reis
Copy link
Contributor

I assume you want this to be looked at after the v5 PR is merged? Since it contains all of those commits.

Yes, I am sorry that I didn't add the description earlier, I think it should be in WIP until the v5 PR is merged

Hmm I think it would be better to do the opposite so that we can make the v5 PR add proper testing with lz4 without the "hack", so if you can cherry pick your commit on top of trunk for this branch so we can merge this first it would be better imo

@worryg0d
Copy link

Hmm I think it would be better to do the opposite so that we can make the v5 PR add proper testing with lz4 without the "hack"

I agree with @joao-r-reis. If this PR gets merged before #1822 it will allow me to eliminate the go.mod replace hack in my PR.

@OleksiienkoMykyta
Copy link
Contributor Author

OleksiienkoMykyta commented Nov 25, 2024

@joao-r-reis @worryg0d, I agree too, it will be much easier this way. I'll do it

@OleksiienkoMykyta OleksiienkoMykyta force-pushed the CASSGO-32-lz4-has-been-moved-into-gocql-package branch from 1a3487e to efe9a1b Compare November 25, 2024 14:13
Copy link
Contributor

@joao-r-reis joao-r-reis left a comment

Choose a reason for hiding this comment

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

Some comments.

Also, the commit message is not 100% accurate:

the lz4 compressor has been integrated directly into the gocql package.

It should be:

the lz4 compressor has been moved to a lz4 package within the main gocql module.

CHANGELOG.md Outdated
@@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- CASSGO-32 Move lz4 Compressor into gocql package
Copy link
Contributor

Choose a reason for hiding this comment

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

follow the format of the other lines

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

go.mod Outdated
gopkg.in/yaml.v3 v3.0.1 // indirect
)

go 1.19
Copy link
Contributor

Choose a reason for hiding this comment

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

We are probably going to do this change at some point but it doesn't make a lot of sense to do it on this PR, should probably do it in #1822

Copy link
Contributor Author

Choose a reason for hiding this comment

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

reverted to go 1.13

@joao-r-reis joao-r-reis changed the title WIP-Cassgo-32 lz4 has been moved into gocql package CASSGO-32 lz4 has been moved into a package within the gocql module Nov 25, 2024
@joao-r-reis joao-r-reis changed the title CASSGO-32 lz4 has been moved into a package within the gocql module CASSGO-32 move lz4 compressor to lz4 package within the gocql module Nov 25, 2024
Currently, the LZ4 compressor is maintained as a separate module under gocql/lz4.
However, its implementation is tightly coupled with Cassandra's specific requirements.
To streamline development, reduce dependency management complexity,
and better encapsulate Cassandra-specific logic,
the lz4 compressor has been moved to a lz4 package within the main gocql module.

Patch by Mykyta Oleksiienko; reviewed by Joao Reis for CASSGO-32
@OleksiienkoMykyta OleksiienkoMykyta force-pushed the CASSGO-32-lz4-has-been-moved-into-gocql-package branch from efe9a1b to 8957933 Compare November 26, 2024 10:01
@@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Move lz4 Compressor into gocql package (CASSGO-32)

Choose a reason for hiding this comment

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

I think it should be something like Move lz4 compressor to lz4 package within the gocql module

github.com/golang/snappy v0.0.3
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed
github.com/kr/pretty v0.1.0 // indirect
github.com/stretchr/testify v1.3.0 // indirect
github.com/pierrec/lz4/v4 v4.1.8

Choose a reason for hiding this comment

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

As I see from lz4 repo for release 4.1.8 go version in go.mod is set to 1.14, but in the gocql go.mod go version is set to 1.13.

Also, this PR bumps version of github.com/stretchr/testify from 1.7.0 to 1.9.0 that requires go of version at least 1.17, The 1.7.0 version only needs go 1.13.

@joao-r-reis should this PR change the go version here due to removing lz4 submodule?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm I don't think it matters if we change the version on go.mod here or not, the current version in go.mod is already incorrect and has been for a while anyway so I think we can just keep it unchanged in this PR and make the change on the v5 support PR to 1.19

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.

3 participants