You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by "JeonDaehong (via GitHub)" <gi...@apache.org> on 2024/09/08 05:31:25 UTC
[PR] Refactor: Use a single definition of MAX_SEGMENT_SIZE in Segment [jackrabbit-oak]
JeonDaehong opened a new pull request, #1702:
URL: https://github.com/apache/jackrabbit-oak/pull/1702
### Description
This PR addresses an issue where `MAX_SEGMENT_SIZE` was defined in both `Segment` and `SegmentDataUtils` with the same value, leading to redundancy. To resolve this:
- `MAX_SEGMENT_SIZE` in `Segment.java` has been made `public`.
- In `SegmentDataUtils.java`, the static import `import static org.apache.jackrabbit.oak.segment.Segment.MAX_SEGMENT_SIZE;` was added to utilize the constant defined in `Segment.java`.
- The redundant definition of `MAX_SEGMENT_SIZE` in `SegmentDataUtils` has been removed.
### Motivation
Having the constant defined in two places created potential maintenance issues and inconsistency risks. By consolidating the definition in `Segment.java`, the code becomes cleaner, more maintainable, and reduces the possibility of errors in future updates.
### Impact
- No functionality change, purely a refactor.
- This change should not impact existing functionality but reduces code duplication.
Please review and merge this PR to streamline the constant usage in both classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] OAK-11085: Use a single definition of MAX_SEGMENT_SIZE in Segment [jackrabbit-oak]
Posted by "Nicolapps (via GitHub)" <gi...@apache.org>.
Nicolapps commented on PR #1702:
URL: https://github.com/apache/jackrabbit-oak/pull/1702#issuecomment-2336707157
Hey @JeonDaehong, thank you for your PR! Sorry, I should have made it clear on the Jira issue, but I’ve already created a PR for this task:
* apache/jackrabbit-oak/pull/1692
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] OAK-11085: Use a single definition of MAX_SEGMENT_SIZE in Segment [jackrabbit-oak]
Posted by "JeonDaehong (via GitHub)" <gi...@apache.org>.
JeonDaehong commented on PR #1702:
URL: https://github.com/apache/jackrabbit-oak/pull/1702#issuecomment-2336828792
Thank you for kindly explaining. Thanks to this issue, I was able to take my first step in contributing to open source. I will continue to show interest and contribute more in the future.
Have a great day!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] OAK-11085: Use a single definition of MAX_SEGMENT_SIZE in Segment [jackrabbit-oak]
Posted by "JeonDaehong (via GitHub)" <gi...@apache.org>.
JeonDaehong closed pull request #1702: OAK-11085: Use a single definition of MAX_SEGMENT_SIZE in Segment
URL: https://github.com/apache/jackrabbit-oak/pull/1702
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Refactor: Use a single definition of MAX_SEGMENT_SIZE in Segment [jackrabbit-oak]
Posted by "JeonDaehong (via GitHub)" <gi...@apache.org>.
JeonDaehong commented on PR #1702:
URL: https://github.com/apache/jackrabbit-oak/pull/1702#issuecomment-2336554766
I successfully ran clean install and clean install -PintegrationTesting with all tests passing
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] OAK-11085: Use a single definition of MAX_SEGMENT_SIZE in Segment [jackrabbit-oak]
Posted by "JeonDaehong (via GitHub)" <gi...@apache.org>.
JeonDaehong commented on PR #1702:
URL: https://github.com/apache/jackrabbit-oak/pull/1702#issuecomment-2336707959
It's very unfortunate... It was my first PR, so I really wanted to be a part of it. Is there perhaps another good opportunity...?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] OAK-11085: Use a single definition of MAX_SEGMENT_SIZE in Segment [jackrabbit-oak]
Posted by "Nicolapps (via GitHub)" <gi...@apache.org>.
Nicolapps commented on PR #1702:
URL: https://github.com/apache/jackrabbit-oak/pull/1702#issuecomment-2336709178
I’m only contributing occasionally to this project so I don’t have a good overview of tasks that could be interesting to solve, but maybe Jira gives you some ideas. Thanks for your interest in this project!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Refactor: Use a single definition of MAX_SEGMENT_SIZE in Segment [jackrabbit-oak]
Posted by "JeonDaehong (via GitHub)" <gi...@apache.org>.
JeonDaehong commented on PR #1702:
URL: https://github.com/apache/jackrabbit-oak/pull/1702#issuecomment-2336554212
Jira Link
https://issues.apache.org/jira/browse/OAK-11085
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: oak-dev-unsubscribe@jackrabbit.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org