-
Notifications
You must be signed in to change notification settings - Fork 6
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
disable listener raw protocol and cleanup #407
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
cgalibern
commented
Sep 7, 2023
- remove code for raw protocol and multiplex
- refactor requester/jsonrpc to core/omcrypto
- fix hbucast deadlock
Unexpected connections are dropped and warn log message is emmited: - drop msg from unexpected connection from % This commit also rephrases log warn messages: - unexpected error while closing connection from <remote addr> - read failed from <remote addr> - read huge message from node <nodename>:<remote addr> msg size: <size> - unmarshal message failed from node <nodename>:<remote addr>
…re now aliases listener raw protocol will be removed, so listener.tls_... is not anymore required. - listener.tls_addr is now an alias of listener.addr - listener.tls_port is now an alias of listener.port
TODO: verify api.yaml
ReadWithNode now uses getMessage instead of GetMessages Bug fixed: a cluster with multiple heartbeat but type (unicast) a heartbeat message that contains multiple Scanned results, will not give back buffer to msgBufferChan (with size 2) => if we receive 2 times such messages then the next ReadWithNode will hang Example if msgBufferChan size is 1: hbucast handle -> ReadWithNode T0, T5 -> func (t *T) ReadWithNode(b []byte) (n int, nodename string, err error) { encByteChan := make(chan []byte) go reqjsonrpc.GetMessages(encByteChan, t.Conn) T1, T5+ -> func GetMessages(q chan []byte, rc io.ReadCloser) error { scanner := bufio.NewScanner(rc) b := <-msgBufferChan T2 T5++: hang defer func() { msgBufferChan <- b }() scanner.Buffer(*b, msgMaxSize) scanner.Split(splitFunc) defer rc.Close() defer close(q) for { scanner.Scan() T3 T4+ b := scanner.Bytes() if len(b) == 0 { break } q <- append([]byte{}, b...) T4 T4++ write hang (no more reader since T4+) => defer msgBufferChan <- b not called } return scanner.Err() } encBytes := <-encByteChan T1+ encMsg := reqjsonrpc.NewMessage(encBytes) T4+
…awconfig dependency
… secret from initial ccfg encryptconn & hbmcast don't anymore need ccfg.Get() on each message
ccfg has a more accurate listener port value than daemonenv.HttpPort
…fix discover fetch failure) If cluster config listener port != daemonenv.HttpPort the discover client use wrong url and can't fetch config from remotes.
But need review daemoncli stop
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.