Hi Sanket, Yes, that's correct.
Thanks, Martijn On Fri, Jul 7, 2023 at 8:00 PM Sanket Agrawal <sagrawal0...@gmail.com> wrote: > Hello Martijn, > > Thank you for your reply. Even for the newer versions of Flink it’s > recommended to use MailboxExecutor in place of StreamTask’s > getCheckpointLock() method, right? > > Thankyou, > Sanket > > On Fri, Jul 7, 2023 at 5:39 AM Martijn Visser <martijnvis...@apache.org> > wrote: > >> Hi Sanket, >> >> Have you read the release notes for Flink 1.11 at >> https://nightlies.apache.org/flink/flink-docs-release-1.11/release-notes/flink-1.11.html#removal-of-deprecated-streamtaskgetcheckpointlock-flink-12484 >> ? >> Given that Flink 1.11 is a version that's no longer supported in the >> Flink community (it's 3 years old at this point), I don't think there will >> be a lot of options here outside those mentioned in the release notes. >> >> Best regards, >> >> Martijn >> >> On Fri, Jul 7, 2023 at 5:35 AM Sanket Agrawal <sagrawal0...@gmail.com> >> wrote: >> >>> Hello, >>> >>> I'm trying to upgrade flink from 1.8 to 1.11 and StreamTask's >>> getcheckpointlock method is removed and the new recommendation is to use >>> MailboxExecutor. Currently we're using it like: >>> >>> synchronized(operator.getContainingTask.getCheckpointLock()) { >>> // perform some operation >>> } >>> >>> The purpose of getCheckpointLock in above code is to get the lock so >>> that the operation can be performed synchronously without interference from >>> any other checkpoint. >>> >>> Since MailboxExecutor is mainly used for asynchronization, I'm finding >>> it difficult to convert the above piece of code to something that uses >>> MailboxExecutor. >>> >>> I hope my problem makes sense, and I would really appreciate it if >>> someone could help me to move forward with this problem. >>> >>> Thank you >>> >>