You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Kirill Tkalenko (Jira)" <ji...@apache.org> on 2020/06/04 13:01:00 UTC
[jira] [Updated] (IGNITE-13119) Data race when getting index
rebuild status
[ https://issues.apache.org/jira/browse/IGNITE-13119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kirill Tkalenko updated IGNITE-13119:
-------------------------------------
Description:
Now it is possible data race when getting status of building an index.
This is possible due to method [1] can invoke earlier [2].
It can reproduce if modify the code here: org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing#rebuildIndexesFromHash
But this will not give a 100% repeat of the problem.
{code:java}
rebuildCacheIdxFut.listen(fut -> {
Throwable err = fut.error();
if (isNull(err)) {
try {
U.sleep(10_000);
markIndexRebuild(cacheName, false);
}
catch (Throwable t) {
err = t;
rebuildCacheIdxFut.onDone(t);
}
}
if (nonNull(err))
U.error(log, "Failed to rebuild indexes for cache: " + cacheName, err);
});
{code}
[1] - org.apache.ignite.internal.IgniteInternalFuture#get()
[2] - org.apache.ignite.internal.IgniteInternalFuture#listen
> Data race when getting index rebuild status
> -------------------------------------------
>
> Key: IGNITE-13119
> URL: https://issues.apache.org/jira/browse/IGNITE-13119
> Project: Ignite
> Issue Type: Improvement
> Reporter: Kirill Tkalenko
> Assignee: Kirill Tkalenko
> Priority: Major
> Fix For: 2.9
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Now it is possible data race when getting status of building an index.
> This is possible due to method [1] can invoke earlier [2].
> It can reproduce if modify the code here: org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing#rebuildIndexesFromHash
> But this will not give a 100% repeat of the problem.
> {code:java}
> rebuildCacheIdxFut.listen(fut -> {
> Throwable err = fut.error();
> if (isNull(err)) {
> try {
> U.sleep(10_000);
>
> markIndexRebuild(cacheName, false);
> }
> catch (Throwable t) {
> err = t;
> rebuildCacheIdxFut.onDone(t);
> }
> }
> if (nonNull(err))
> U.error(log, "Failed to rebuild indexes for cache: " + cacheName, err);
> });
> {code}
> [1] - org.apache.ignite.internal.IgniteInternalFuture#get()
> [2] - org.apache.ignite.internal.IgniteInternalFuture#listen
--
This message was sent by Atlassian Jira
(v8.3.4#803005)