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

Stream member crashes during start when unexpected files are present in the stream directory. #12688

Closed
kjnilsson opened this issue Nov 8, 2024 · 2 comments
Labels
Milestone

Comments

@kjnilsson
Copy link
Contributor

Describe the bug

osiris_log:orphaned_segments/1 crashes if unexpected files are present:

�[38;5;160m2024-11-08 07:18:24.261879+00:00 [error] <0.94299120.0>                                  [[<<"UNEXPECTED_FILE">>],[]],�[0m
�[38;5;160m2024-11-08 07:18:24.261879+00:00 [error] <0.94299120.0>                                  [{file,"src/osiris_log.erl"},{line,1822}]},�[0m
�[38;5;160m2024-11-08 07:18:24.261879+00:00 [error] <0.94299120.0>                      {osiris_log,maybe_fix_corrupted_files,1,�[0m
�[38;5;160m2024-11-08 07:18:24.261879+00:00 [error] <0.94299120.0>                                  [{file,"src/osiris_log.erl"},{line,631}]},�[0m
�[38;5;160m2024-11-08 07:18:24.261879+00:00 [error] <0.94299120.0>                      {osiris_log,init,2,�[0m
�[38;5;160m2024-11-08 07:18:24.261879+00:00 [error] <0.94299120.0>                                  [{file,"src/osiris_log.erl"},{line,530}]},�[0m
�[38;5;160m2024-11-08 07:18:24.261879+00:00 [error] <0.94299120.0>                      {osiris_replica,handle_continue,2,�[0m
�[38;5;160m2024-11-08 07:18:24.261879+00:00 [error] <0.94299120.0>                                      [{file,"src/osiris_replica.erl"},�[0m
�[38;5;160m2024-11-08 07:18:24.261879+00:00 [error] <0.94299120.0>                                       {line,175}]},�[0m
�[38;5;160m2024-11-08 07:18:24.261879+00:00 [error] <0.94299120.0>                      {gen_server,try_handle_continue,3,�[0m
�[38;5;160m2024-11-08 07:18:24.261879+00:00 [error] <0.94299120.0>                                  [{file,"gen_server.erl"},{line,1085}]},�[0m
�[38;5;160m2024-11-08 07:18:24.261879+00:00 [error] <0.94299120.0>                      {gen_server,loop,7,[{file,"gen_server.erl"},{line,995}]},�[0m
�[38;5;160m2024-11-08 07:18:24.261879+00:00 [error] <0.94299120.0>                      {proc_lib,init_p_do_apply,3,�[0m
�[38;5;160m2024-11-08 07:18:24.261879+00:00 [error] <0.94299120.0>                                [{file,"proc_lib.erl"},{line,241}]}]}�[0m
�[38;5;160m2024-11-08 07:18:24.261879+00:00 [error] <0.94299120.0> �[0m

Reproduction steps

  1. add a random file to stream directory
  2. restart stream

...

Expected behavior

ignore unexpected files

Additional context

No response

@kjnilsson kjnilsson added the bug label Nov 8, 2024
@kjnilsson kjnilsson added this to the 4.0.4 milestone Nov 8, 2024
@michaelklishin
Copy link
Member

Part of the solution rabbitmq/osiris#171.

@michaelklishin
Copy link
Member

#12704

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants