Skip to content

Conversation

@vikumar-ciena
Copy link

there is a problems when nodes at lock node level where protected Ephemeral nodes are created have user created nodes as well. lockWithData function tries to use those user created node to calculate sequence number and it fails or stuck .

  1. Fails : when user created node is not an integer
  2. Stuck : when user created not have a sequence number less than current lock sequence number.

@codecov
Copy link

codecov bot commented Nov 27, 2020

Codecov Report

Merging #44 (f0796c0) into master (54f4812) will decrease coverage by 0.21%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #44      +/-   ##
==========================================
- Coverage   76.11%   75.90%   -0.22%     
==========================================
  Files           7        7              
  Lines        1189     1191       +2     
==========================================
- Hits          905      904       -1     
- Misses        195      196       +1     
- Partials       89       91       +2     
Impacted Files Coverage Δ
lock.go 64.38% <100.00%> (+1.00%) ⬆️
conn.go 72.68% <0.00%> (-0.48%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 54f4812...f0796c0. Read the comment docs.

prevSeq := -1
prevSeqPath := ""
for _, p := range children {
if !(strings.HasPrefix(p, protectedPrefix) || strings.Contains(strings.ToUpper(p), "__LOCK__")) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this prefix check necessary here?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may be blind but where is protectedPrefix coming from?

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

Successfully merging this pull request may close these issues.

2 participants