Skip to content
This repository was archived by the owner on Dec 17, 2018. It is now read-only.

Conversation

@shorero
Copy link

@shorero shorero commented Nov 17, 2015

The two commits on the RWShore branch solve the following problems:

  1. table-create statements used highly non-standard SQL. TINYINT turns out to be non-standard (changed to SMALLINT). More importantly, the IF NOT EXISTS clause isn't standard and broke (in particular) the embedded Derby database I wanted to use. Fixing the log and store was simple: use the database metadata to see if the table exists. The snapshot DAO object is a hack: simply ignore exceptions thrown from the create code. There may be a better way to fix the DAO object, but I didn't have the time to figure out how the JDBI package works.
  2. For reasons that I don't understand, different hosts on my network resolve hostnames differently; some pick up the IPv4 address and some the IPv6 address. This prevents all the nodes from communicating, since some nodes were listening on the v6 address but other nodes were attempting to contact them using the v4 address. My fix is to add an all-address boolean flag to the RAFT configuration; if the flag is true, then the fully-resolved bind address used for the server employs the port number only (making the IP address a wildcard and effectively binding the server to both the v4 and v6 addresses).

RW Shore added 3 commits November 17, 2015 10:42
…use everywhere, since this is highly non-standard SQL. For the JDBC log and store, use the database metadata to decide if the table exists. For the snapshot DAO class, simply ignore any error thrown by the table-create code.
…AFT config. The problem was that some clients were resolving host names to IPv4 addresses and some to IPv6 addresses. If the RAFT network client always binds to a single address, the cluster could never get together. 'allAddresses' set to 'true' causes the server on the local host to listen to all addresses (that is, the server channel binds to a server-socket address with a wildcard IP address), which fixes the problem.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant