[
https://issues.apache.org/jira/browse/IMPALA-13590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17905302#comment-17905302
]
ASF subversion and git services commented on IMPALA-13590:
----------------------------------------------------------
Commit 071d176180807c1d5a5678a036af6d8e63770ed9 in impala's branch
refs/heads/master from Eyizoha
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=071d17618 ]
IMPALA-13590: Use CacheLineAligned instead of CACHELINE_ALIGNED for
PerFilterState
Currently, class PerFilterState is marked with CACHELINE_ALIGNED, which
is actually a macro definition of __attribute__((aligned())). For static
allocation, it can specify memory alignment, but it cannot specify
alignment for dynamic memory allocation. In the code, all PerFilterState
objects are dynamically created using make_unique in the function
RuntimeFilterBank::BuildFilterMap(), so CACHELINE_ALIGNED does not
really have any effect. It might even lead to unexpected situations as
described in the JIRA comments.
Therefore, this patch replaces CACHELINE_ALIGNED with CacheLineAligned,
which supports alignment for dynamic memory allocation.
Testing:
- Existing tests cover this change.
Change-Id: I0d119679b1d446cb69f6eec595def2d40cb6d1ff
Reviewed-on: http://gerrit.cloudera.org:8080/22147
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> The CACHELINE_ALIGNED of PerFilterState may not work on dynamic allocations
> ---------------------------------------------------------------------------
>
> Key: IMPALA-13590
> URL: https://issues.apache.org/jira/browse/IMPALA-13590
> Project: IMPALA
> Issue Type: Bug
> Components: Backend
> Affects Versions: Impala 4.4.1
> Reporter: Zihao Ye
> Assignee: Zihao Ye
> Priority: Major
>
> The PerFilterState class is marked with CACHELINE_ALIGNED:
> [https://github.com/apache/impala/blob/8416432cc3e656b6c5fa230d4075ba64e0f3d091/be/src/runtime/runtime-filter-bank.h#L300]
> And its creation is dynamic:
> [https://github.com/apache/impala/blob/8416432cc3e656b6c5fa230d4075ba64e0f3d091/be/src/runtime/runtime-filter-bank.cc#L116]
> According to this response, such a combination may be ineffective:
> [https://stackoverflow.com/questions/19251360/attribute-alignedx-doesnt-work-on-dynamic-allocations].
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]