Tags: cilium/statedb
Tags
script: Allow dynamic comparison when env vars are used If the expected file in a script-based test used in the "db/cmp" command is formatted with tabs as the whitespace (instead of just plain spaces), then detect this as a special case. This is key for avoiding indentation issues when comparing against the returned results in a test that have an env var that needs expansion. This is because we cannot know the length of the env var value after expansion. In other words, formatting by tabs makes it so that there is only ever one character after expanding the env var, and so it makes the spacing between columns predictable. Example: ``` \# This is formatted with tabs. -- db.table -- ID Message ${env1} 107 ${env2} 23 ``` Signed-off-by: Chris Tarazi <[email protected]>
statedb: panic if initializer is marked done while not holding lock Similarly to the registration operation, let's panic if the target table is not included in the write transaction, to make the failure explicit, instead of silently skipping the operation and not marking the table as initialized. Signed-off-by: Marco Iorio <[email protected]>
part: Fix returned watch channel in search() If there was a leaf node with a key that was shorter than our search key we incorrectly returned that leaf node's watch channel instead of the channel of the parent non-leaf node. This caused the watch channel returned by GetWatch() to not close when expected. Signed-off-by: Jussi Maki <[email protected]>
part: Fix returned watch channel in search() If there was a leaf node with a key that was shorter than our search key we incorrectly returned that leaf node's watch channel instead of the channel of the parent non-leaf node. This caused the watch channel returned by GetWatch() to not close when expected. Signed-off-by: Jussi Maki <[email protected]>
part: Fix replace of root watch with RootOnlyWatch [ upstream commit aa75e72 ] When promoting the root node its watch channel should always be replaced. The comparison was incorrect and this lead to the same channel being used in new tree which is why "Commit()" lead to "close of a closed channel". StateDB used "RootOnlyWatch" in the revision index and we never hit this since it only happens when promoting the root node and you need to hit revision 2^(7*8) before the root node needs to be promoted. Signed-off-by: Jussi Maki <[email protected]>
PreviousNext