Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception raised on startup if the cache file is corrupted #7

Open
flaviogrossi opened this issue Feb 20, 2019 · 1 comment
Open

exception raised on startup if the cache file is corrupted #7

flaviogrossi opened this issue Feb 20, 2019 · 1 comment

Comments

@flaviogrossi
Copy link

If the file containing the persisted cache on disk is corrupted (empty file in this case), the following error is raised:

    ** (EXIT) an exception was raised:
        ** (MatchError) no match of right hand side value:
    {:error, {%ArgumentError{message: "/tmp/tus_cache.tab is not a valid PersistentEts file: {:read_error, {:not_a_log_file, '/tmp/tus_cache.tab'}}"}, [{PersistentEts.TableManager, :open_table, 3, [file: 'lib/table_manager.ex', line: 180]}, {PersistentEts.TableManager, :init, 1, [file: 'lib/table_manager.ex', line: 72]}, {:gen_server, :init_it, 2, [file: 'gen_server.erl', line: 374]}, {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 342]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}}
            (persistent_ets) lib/persistent_ets.ex:75: PersistentEts.new/3
            (tus_plug) lib/tus_plug/cache.ex:54: TusPlug.Cache.init/1
            (stdlib) gen_server.erl:374: :gen_server.init_it/2
            (stdlib) gen_server.erl:342: :gen_server.init_it/6
            (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3```
@xadhoom
Copy link
Owner

xadhoom commented Feb 20, 2019

For some reason :dets auto repair fails, maybe we can try harder and delete the file if autorepair fails

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

No branches or pull requests

2 participants