[ 
https://issues.apache.org/jira/browse/KAFKA-12211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

A. Sophie Blee-Goldman updated KAFKA-12211:
-------------------------------------------
    Priority: Minor  (was: Major)

> NoSuchFileException will be thrown if hasPersistentStores is false when 
> creating stateDir
> -----------------------------------------------------------------------------------------
>
>                 Key: KAFKA-12211
>                 URL: https://issues.apache.org/jira/browse/KAFKA-12211
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 2.7.0, 2.6.1
>            Reporter: Luke Chen
>            Assignee: Luke Chen
>            Priority: Minor
>             Fix For: 2.8.0, 2.7.1, 2.6.2
>
>
> We improved the state directory folder/file permission setting in 
> KAFKA-10705. But we forgot to consider one situation: if user doesn't have 
> PersistentStores, we won't need to create base dir and state dir. And if 
> there's no such dir/file, and we tried to set permission to them, we'll have 
> *NoSuchFileException*
>  
> {code:java}
> ERROR Error changing permissions for the state or base directory 
> /var/folders/4l/393lkmzx3zvftwynjngzdsfw0000gn/T/kafka-11254487964259813330/appId_AdjustStreamThreadCountTestshouldAddStreamThread
>   (org.apache.kafka.streams.processor.internals.StateDirectory:117)
> 2021-01-15T16:10:44.570+0800 [DEBUG] [TestEventLogger]     
> java.nio.file.NoSuchFileException: 
> /var/folders/4l/393lkmzx3zvftwynjngzdsfw0000gn/T/kafka-11254487964259813330/appId_AdjustStreamThreadCountTestshouldAddStreamThread
> 2021-01-15T16:10:44.570+0800 [DEBUG] [TestEventLogger]          at 
> java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
> 2021-01-15T16:10:44.570+0800 [DEBUG] [TestEventLogger]          at 
> java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
> 2021-01-15T16:10:44.570+0800 [DEBUG] [TestEventLogger]          at 
> java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
> 2021-01-15T16:10:44.570+0800 [DEBUG] [TestEventLogger]          at 
> java.base/sun.nio.fs.UnixFileAttributeViews$Posix.setMode(UnixFileAttributeViews.java:254)
> 2021-01-15T16:10:44.570+0800 [DEBUG] [TestEventLogger]          at 
> java.base/sun.nio.fs.UnixFileAttributeViews$Posix.setPermissions(UnixFileAttributeViews.java:276)
> 2021-01-15T16:10:44.570+0800 [DEBUG] [TestEventLogger]          at 
> java.base/java.nio.file.Files.setPosixFilePermissions(Files.java:2079)
> 2021-01-15T16:10:44.570+0800 [DEBUG] [TestEventLogger]          at 
> org.apache.kafka.streams.processor.internals.StateDirectory.<init>(StateDirectory.java:115)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to