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

Possible incompatibility with OTP 25 #41

Open
mrz opened this issue Jul 26, 2022 · 1 comment
Open

Possible incompatibility with OTP 25 #41

mrz opened this issue Jul 26, 2022 · 1 comment

Comments

@mrz
Copy link

mrz commented Jul 26, 2022

OTP 25 has turned on by default the prevent_overlapping_partitions Kernel option. Since updating to this version of OTP, my tests that rely on schism to create partitions started to fail, and I see the following output:

  2) test distributed heartbeat monitor - splitting off two nodes marks their caches as unhealthy (MyAppWeb.HeartbeatServiceTest)
     test/my_app_web/services/heartbeat_test.exs:143
     ** (MatchError) no match of right hand side value: :pang
     code: Schism.partition([first, second])
     stacktrace:
       (schism 1.0.1) lib/schism.ex:53: anonymous fn/5 in Schism.partition/2
       (elixir 1.13.4) lib/enum.ex:2396: Enum."-reduce/3-lists^foldl/2-0-"/3
       (schism 1.0.1) lib/schism.ex:41: Schism.partition/2
       test/my_app_web/services/heartbeat_test.exs:149: (test)

     The following output was logged:
     
     14:41:57.283 [warning] 'global' at node :"[email protected]" requested disconnect from node :"[email protected]" in order to prevent overlapping partitions
     
     14:41:57.284 [warning] 'global' at node :"[email protected]" requested disconnect from node :"[email protected]" in order to prevent overlapping partitions
     
     14:41:57.284 [warning] 'global' at node :"[email protected]" requested disconnect from node :"[email protected]" in order to prevent overlapping partitions
     
     14:41:57.285 [warning] 'global' at node :"[email protected]" requested disconnect from node :"[email protected]" in order to prevent overlapping partitions

The code that triggers this looks like this:

    test "splitting off two nodes marks their caches as unhealthy", %{nodes: nodes} do
      [first | [second | rest]] = nodes

      assert :connected = :rpc.call(first, CacheState, :state, [])

      Schism.partition([first, second])   # <- Line raising the error
      Schism.partition(rest)
      
      [...]
   end
@derekkraan
Copy link

Sorted out the proper syntax to disable:

ELIXIR_ERL_OPTIONS='-kernel prevent_overlapping_partitions false' mix test

derekkraan added a commit to derekkraan/horde that referenced this issue Sep 29, 2023
Disable prevent_overlapping_partitions because it conflicts with Schism.
(see elixir-toniq/schism#41)
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