You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/04/25 05:46:28 UTC

[GitHub] [flink] klion26 opened a new pull request #8263: St[FLINK-12296][StateBackend]Data loss silently in RocksDBStateBackend because of local directory collision

klion26 opened a new pull request #8263: St[FLINK-12296][StateBackend]Data loss silently in RocksDBStateBackend because of local directory collision
URL: https://github.com/apache/flink/pull/8263
 
 
   ## What is the purpose of the change
   Fix the data loss silently problem in RocksDBStateBackend when more than one stateful operators chained in a single task.
   
   When preparing the local directory we'll delete the local directory if it already exists.
   
   Currently, if more than one stateful operators chained in a single task, they'll share the same local directory path, then the local directory will be deleted unexpected, and we'll get data loss silently.
   
   ## Brief change log
   
   Change the local data path from
   `/local_state_root/allocatio_id/job_id/jobvertext_id_subtask_id/chk_id`
   to
   `/local_state_root/allocatio_id/job_id/jobvertext_id_subtask_id/operator_id_chk_id`
   
   The reason to use operator instead of operatorIdentifier is that we'll look up operator owned data path in `TaskLocalStateStoreImpl#discardLocalStateForCheckpoint`.
   
   The reason to put operator_id in the last dir instread of the last but one dir because we'll look up the task owned base directory in `TaskLocalStateStoreImpl#dispose`.
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
   - `LocalRecoveryDirectoryProviderImplTest#differentDirectoryForDifferentOperator()`
   - `OperatorSubtaskDescriptionTextTest#testExtractOperatorId`
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (**no**)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (**no**)
     - The serializers: (**no**)
     - The runtime per-record code paths (performance sensitive): (**no**)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (**yes**)
     - The S3 file system connector: (**no**)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (**no**)
     - If yes, how is the feature documented? (**not applicable**)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services