Comments (1)
This is an issue with using pids as node names, as :erlang.phash2
ignores the node component of the pid, so in your case above, only the node component differs, so they are considered equivalent. I'm not sure why this behavior exists. It's best to avoid using pids alone as nodes, another option is to use {node(), pid()}
as a key, that way the hash will be unique, and you can still easily obtain the original pid. You could also use pid_to_list and list_to_pid to serialize/deserialize them for hashing/storage in the ring.
from libring.
Related Issues (14)
- Invalid new state in handle_info
- :erlang.phash2 does not uniformly distribute atoms across the hash range, should this be documented in README? HOT 3
- Top-level Module Named Hashring conflicts with other libraries HOT 10
- Missing :logger dependency
- Tests cannot be run HOT 1
- Don't rename process (suggestion)
- `:simple_one_for_one` strategy deprecation warning in Elixir 1.10 HOT 1
- Using the GenServer for reads is inefficient switch to ETS instead HOT 1
- Local node never returned in key lookup
- README specifies libring version that doesn't exist in hex HOT 1
- HashRing.Managed.new doesn't work as expected HOT 1
- It would be useful to have a method that just returns the nodes HOT 1
- HashRing.add_node error - gb_trees.insert_1/4 {:key_exists} HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libring.