Giter VIP home page Giter VIP logo

highlander's People

Contributors

derekkraan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

highlander's Issues

test case "test heals after a large netsplit (NetsplitTest)" fails

I'm running tests with
ELIXIR_ERL_OPTIONS='-kernel prevent_overlapping_partitions false' mix test

fails with

     test/netsplit_test.exs:56
     Unexpectedly received message {:hello_from, #PID<22941.277.0>} (which matched {:hello_from, _})
     code: refute_receive({:hello_from, _})
     stacktrace:
       test/netsplit_test.exs:73: (test)

To me it looks like the test case is wrong.

Feature request: add ability to prioritize or add a delay to grabbing the global name.

At the risk of adding a slight complexity to a great simple library.

I have two use cases where the default behavior is not optimal.

  1. When adding a new machine to the cluster, on startup before other nodes are discovered grabbing the global name will eventually cause a name conflict and possibly unnecessarily kill the existing owner that has been up for some time.

  2. In a cluster where there are mix of permanent instance and spot instances, I would prefer permanent instances take priority over the spots.

My initial approach is to call a function in the child module (if defined), during the registration which can add a pause. If this seems like a sane approach I will submit a pull request when done.

`FunctionClauseError` in `handle_info` for exit

GenServer #PID<0.3098.0> terminating
** (stop) exited in: GenServer.stop(#PID<0.3099.0>, {:function_clause, [{Highlander, :handle_info, [{:EXIT, #PID<0.3099.0>, :shutdown}, %{pid: #PID<0.3099.0>, child_spec: %{id: Acme.Worker, start: {Acme.Worker, :start_link, [[]]}}}], [file: ~c"lib/highlander.ex", line: 90]}, {:gen_server, :try_handle_info, 3, [file: ~c"gen_server.erl", line: 1095]}, {:gen_server, :handle_msg, 6, [file: ~c"gen_server.erl", line: 1183]}, {:proc_lib, :init_p_do_apply, 3, [file: ~c"proc_lib.erl", line: 241]}]}, :infinity)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (elixir 1.15.7) lib/gen_server.ex:1031: GenServer.stop/3
    (highlander 0.2.1) lib/highlander.ex:101: Highlander.terminate/2
    (stdlib 5.2) gen_server.erl:1143: :gen_server.try_terminate/3
    (stdlib 5.2) gen_server.erl:1339: :gen_server.terminate/10
    (stdlib 5.2) proc_lib.erl:241: :proc_lib.init_p_do_apply/3
Last message: {:EXIT, #PID<0.3099.0>, :shutdown}
State: %{pid: #PID<0.3099.0>, child_spec: %{id: Acme.Worker, start: {Acme.Worker, :start_link, [[]]}}}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.