Skip to content

Snappy should use randomize directory or library name when importing .so file #84

@pwendell

Description

@pwendell

If two users on the same machine use snappy-java they will end up using the same temp directory (e.g. /tmp) by default. Due to file permissions this can cause a runtime exception if user A creates the file and then user B tries to access the file later but doesn't have permissions.

I see two very simple fixes for this. One is to create a randomized sub-directory of "java.io.tmpdir" when loading. The second is to add a time-stamp or randomized prefix to the .so library.

Technically users can work around this by setting the temp dir explicitly, but the out-of-the-box behavior does seem like it could be improved.

We ran into this issue in Spark:
https://issues.apache.org/jira/browse/SPARK-2881

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions