Skip to content

Conversation

@rymurr
Copy link
Contributor

@rymurr rymurr commented Jun 4, 2020

This commit moves all Netty specific calls into a few classes.
This is the precursor to splitting the netty and unsafe allocatorsout to their own modules

@github-actions
Copy link

github-actions bot commented Jun 4, 2020

Copy link
Contributor

Choose a reason for hiding this comment

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

we should print some logs here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, any suggestions where? Note: This is taken from PlatformDependent0 in netty (logs and all).

Copy link
Contributor

Choose a reason for hiding this comment

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

looks good. thanks.
since the exception handling logic is identical, does it make the code conciser to use the following semantics?

catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {
  ...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

Choose a reason for hiding this comment

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

It would be helpful for problem diagnostic, if we could print some logs here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done! thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible that this value changes from Netty code base?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is possible that it changes. It was a bit involved to copy the Netty code to get chunk size into the arrow codebase so I left it at a likely value for x86-64 machines. I am happy to replace this with the Netty value or have chunk size taken from the actual allocator directly if you thikn that is better than a single static value?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it is beneficial to add above discussion to the JavaDoc

Copy link
Contributor Author

@rymurr rymurr Jun 25, 2020

Choose a reason for hiding this comment

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

I ended up taking the implementation from Netty rather than the static value here. I thought it was a bit safer.

@rymurr rymurr force-pushed the ARROW-8230 branch 2 times, most recently from 3585eb6 to 7b2a9e1 Compare June 22, 2020 15:12
@rymurr
Copy link
Contributor Author

rymurr commented Jun 25, 2020

Thanks for the reviews @liyafan82 I have updated based on your comments. Please let me know what you think!

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: an -> a

Copy link
Contributor

Choose a reason for hiding this comment

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

teh -> the

@liyafan82
Copy link
Contributor

@rymurr Thanks for your effort. I will make another pass today.

Copy link
Contributor

Choose a reason for hiding this comment

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

please remove "DEFAULT_PAGE_SIZE" here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove "DEFAULT_MAX_ORDER" here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

Choose a reason for hiding this comment

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

Also here we need only one parameter in the "else" statement.

Copy link
Contributor

Choose a reason for hiding this comment

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

here the log level should be warning or error?

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a special reason for the cast here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

None, only that it was how the netty developers wrote it. I thought I would copy their lead. However, I have simplified it now,

@liyafan82
Copy link
Contributor

Mostly looks good to me. There are a few minor issues.
Since it involves some fundamental classes, could you please make sure our integration tests pass? @rymurr

@rymurr
Copy link
Contributor Author

rymurr commented Jun 29, 2020

Thanks @liyafan82 I have updated based on your comments and the integration tests have passed.

@rymurr
Copy link
Contributor Author

rymurr commented Jun 29, 2020

looks like an ongoing github incident is causing build failures. Will rebase and rebuild once Github is back to normal

Copy link
Contributor

Choose a reason for hiding this comment

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

I think here we only need one parameter here? So it should be

logger.debug("-Dorg.apache.memory.allocator.pageSize: {}", pageSizeFallbackCause);

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: an -> a

@liyafan82
Copy link
Contributor

@rymurr Thanks for your work. A few typos.
I think it would be ready for merge.

@rymurr
Copy link
Contributor Author

rymurr commented Jul 1, 2020

Thanks a lot @liyafan82 I have addressed your suggestions and rebased

This commit moves all Netty specific calls into a few classes.
This is the precursor to splitting the netty and unsafe allocators
out to their own modules
@liyafan82
Copy link
Contributor

Thanks a lot @liyafan82 I have addressed your suggestions and rebased

@rymurr Thanks for your work. Will merge when it turns green.

@liyafan82 liyafan82 merged commit bcbb3e2 into apache:master Jul 2, 2020
@emkornfield
Copy link
Contributor

@liyafan82 if you aren't already please make sure you use the merge script under dev to merge PRs

@liyafan82
Copy link
Contributor

@liyafan82 if you aren't already please make sure you use the merge script under dev to merge PRs

@emkornfield Thanks a lot for your kind reminder. I will use the script next time.

@rymurr rymurr deleted the ARROW-8230 branch July 3, 2020 08:55
pribor pushed a commit to GlobalWebIndex/arrow that referenced this pull request Oct 24, 2025
…7347)

This commit moves all Netty specific calls into a few classes.
This is the precursor to splitting the netty and unsafe allocators
out to their own modules
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