Consider bits type storage

Description

YANG 'bits' type is currently mapped to a Set<String>. This has pros (like model-independence) and cons (storage overhead).
Assuming schema-informedness, we should be able to provide a Set which is backed by an int (or a long, or a byte[]) plus a offset-to-name mapping. This would lower our storage requirements in places where we can assume such a mapping.

Activity

Show:

Ruslan Kashapov December 13, 2022 at 11:31 AM
Edited

Ivan Martiniak October 18, 2022 at 11:14 AM
Edited

I have a few questions regarding this issue, compared to https://lf-opendaylight.atlassian.net/browse/MDSAL-746, I was working with bit values (0 or 1).
In this case, storing these values was pretty straightforward, as these primitive types consist of booleans.
However currently, I do not work with bit values, I work with bit names only. Hence, if will transform Set<String> to Integer,
I still need to have this set of string names stored somewhere and mapped to the bit position.

1. How is envisioned to replace Set<String> with Set backed by primitive data types such as int, long, and byte[]?
2. How would this lower storage requirement when this set of bit names still needs to exist?
3. What exactly is meant by offset-to-name mapping?

do you have any thoughts/advice?

Details

Assignee

Reporter

Fix versions

Priority

Created April 11, 2022 at 7:13 PM
Updated July 8, 2024 at 9:21 AM