You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Roman Puchkovskiy (Jira)" <ji...@apache.org> on 2023/04/10 09:03:00 UTC
[jira] [Commented] (IGNITE-19263) Don't complete future at Checkpointer#syncUpdatedPageStores when Checkpointer shuts down
[ https://issues.apache.org/jira/browse/IGNITE-19263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17710089#comment-17710089 ]
Roman Puchkovskiy commented on IGNITE-19263:
--------------------------------------------
LGTM
> Don't complete future at Checkpointer#syncUpdatedPageStores when Checkpointer shuts down
> ----------------------------------------------------------------------------------------
>
> Key: IGNITE-19263
> URL: https://issues.apache.org/jira/browse/IGNITE-19263
> Project: Ignite
> Issue Type: Bug
> Reporter: Kirill Tkalenko
> Assignee: Kirill Tkalenko
> Priority: Major
> Labels: ignite-3
> Fix For: 3.0.0-beta2
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> It was found that the future did not complete on the *Checkpointer* shuts down, which can lead to hangs.
> *org.apache.ignite.internal.pagememory.persistence.checkpoint.Checkpointer#syncUpdatedPageStores*
> {code:java}
> for (int i = 0; i < checkpointThreads; i++) {
> int threadIdx = i;
> pageWritePool.execute(() -> {
> Map.Entry<GroupPartitionId, LongAdder> entry = queue.poll();
> try {
> while (entry != null) {
> if (shutdownNow) {
> return;
> }
> fsyncDeltaFile(currentCheckpointProgress, entry.getKey(), entry.getValue());
> entry = queue.poll();
> }
> futures[threadIdx].complete(null);
> } catch (Throwable t) {
> futures[threadIdx].completeExceptionally(t);
> }
> });
> }
> blockingSectionBegin();
> try {
> // Hangs there.
> CompletableFuture.allOf(futures).join();
> } finally {
> blockingSectionEnd();
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)