Skip to content

Hotfix remove unreachedexception#1

Open
lamberken wants to merge 2294 commits into
bug-checkpoint-restore-failed-testfrom
hotfix-remove-unreachedexception
Open

Hotfix remove unreachedexception#1
lamberken wants to merge 2294 commits into
bug-checkpoint-restore-failed-testfrom
hotfix-remove-unreachedexception

Conversation

@lamberken

Copy link
Copy Markdown
Member

What is the purpose of the change

(For example: This pull request makes task deployment go through the blob server, rather than through RPC. That way we avoid re-transferring them on each deployment (during recovery).)

Brief change log

(for example:)

  • The TaskInfo is stored in the blob store on job creation time as a persistent artifact
  • Deployments RPC transmits only the blob storage reference
  • TaskManagers retrieve the TaskInfo from the blob cache

Verifying this change

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (100MB)
  • Extended integration test for recovery after master (JobManager) failure
  • Added test that validates that TaskInfo is transferred only once across recoveries
  • Manually verified the change by running a 4 node cluser with 2 JobManagers and 4 TaskManagers, a stateful streaming program, and killing one JobManager and two TaskManagers during the execution, verifying that recovery happens correctly.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
  • The serializers: (yes / no / don't know)
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / no / don't know)
  • The S3 file system connector: (yes / no / don't know)

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

KarmaGYZ and others added 30 commits December 10, 2018 15:50
…itting records

We need to make sure that concurrent access to the RecordWriter is protected by
a lock. It seems that everything but the StreamIterationHead was synchronizing
on the checkpoint lock and hence we sync here as well.
… tests should fail if exception isn't thrown

This commit strengthens tests in StateBackendMigrationTestBase that
depend on a certain state operation (restoring state, accessing state,
etc.) to be failing to assert correct behaviour. However, we previously
do not really fail the test if no exception was thrown when there should
be.

This also caught some bugs in the test itself which had the tests
verifying incorrect behaviour.
…ackend should always be compatible

Previously, we were only checking if the new namespace serializer is
incompatible, while properly we should be checking that it is strictly
compatible.

This doesn't affect any user expected behaviour, since the namespace
serializer is never exposed to users.
…ore understandable

The StateBackendMigrationTestBase previously mocked user behaviour of
upgrading serializers by using a single serializer class, that can be
configured with different target compatibility results when they are
checked for compatibility.

This is a bit hard to understand, also doesn't really reflect how a user
would actually approach the feature. Instead, instead of configuring a
single serializer class with different compatibility "personalities",
this commit uses actual different classes, V1TestTypeSerializer,
V2TestTypeSerializer, and IncompatibleTestTypeSerializer, to simulate
the compatibility cases in tests.

This commit also refactors the serializer migration related test
serializers / types / snapshots to the testutil package, so that it can
be shared by other state migration related tests in the future.
…in RocksDBKeyedStateBackend

This ensures that all restored state, even non-accessed ones after the
restore, have a meta info available on future snapshots.
…store serializer

This commit introduces StateSerializerProvider that
wraps logic on how to obtain serializers for registered state,
either with the previous schema of state in checkpoints or
the current schema of state.

All state meta info subclasses use
StateSerializerProviders to replace direct serializer instances. This
allows meta infos that were instantiated with restored serializer
snapshots to not eagerly access the restore serializer when restoring
state. This needs to be avoided since when restoring from 1.6, the
restore serializer might not be available; for RocksDB, this should be
tolerable.
… map for restored StateMetaInfoSnapshots

Since now all restored state meta info snapshots are handled so that we
always eagerly create the corresponding RegisteredStateMetaInfoBase for
it, the information is already part of the registered state infos map.

As can be seen in the changes, those maps are no longer queried and can
therefore be safely removed.

This closes apache#7264.
…MetaInfoSnapshot

This commit removes the `restoreTypeSerializer(...)` method.
That method is no longer used after the series of changes in
FLINK-11094. This also corresponds to the new principle that the restore
serializer is only accessed, when the state backends attempt request it
from their state meta infos. We do not create restore serializers
eagerly when creating meta infos from a StateMetaInfoSnapshot.

It also removes "config" from names of methods and fields
related to serializer snapshotting.
This corresponds to the abstraction rework of retiring
TypeSerializerConfigSnapshot to be replaced by TypeSerializerSnapshot.
The related fields / methods should not mention "config" anymore.
…ot association when restoring from 1.5.x

When restoring a broadcast state's meta information from a 1.5.x
savepoint, the
LegacyStateMetaInfoReaders.OperatorBackendStateMetaInfoReaderV2V3
incorrectly associates the first restored serializer as the value
serializer, and the second restored serializer as the key serializer.
The actual order of this should be the other way around.

This bug prevents successful broadcast state restores from 1.5, both for
Flink 1.6.x and 1.7.0.

The commit also modifies the StatefulJobWBroadcastStateMigrationITCase
to have different key / value types for its tested broadcast tests,
which otherwise would not have caught this bug.
…estoring 1.5.x braodcast state in later versions.

This closes apache#7256.
- use UnregisteredMetricGroups instead
- simplify metrics
- encapsulate TestActor fields
ifndef-SleePy and others added 30 commits January 14, 2019 09:58
…ends.md

In order to use the RocksDBStateBackend, the user has to add the flink-statebackend-rocksdb
dependency to his project. This commit adds this information to the state_backends.md.

This closes apache#7480.
The clock parameter is missing in the docstring.

This closes apache#7484.
This changes the S3AccessHelper API to take a file instead of an input
stream.

This allows s3 client to properly reset a file instead of a file over
stream for writes.

This fixes an issue where the underlying s3 implementation has an
intermittent failure, tries to reset the stream, fails to do so, and
results in hung requests with delayed errors.
…locks for finite stream jobs when resources are limited

This commit adds a job config InputDependencyConstraint, which helps to avoid
resource deadlocks in LAZY_FROM_SOURCES scheduling when resources are limited.

The InputDependencyConstraint controls across multiple inputs when consumers are
scheduled. Currently it supports ANY and ALL. ANY means that any input intermediate
result partition must be consumable and ALL means that all input intermediate result
partitions (from all inputs) need to be consumable in order to schedule the consumer task.

This closes apache#7255.
…rom query.x to queryable-state.x

Change-Id: Idb561da3982de07e77a05ffef9ad227094f527b0
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.