vinyl: do not fill secondary tuples with nulls when decoded
In contrast to a primary index, which stores full tuples, secondary indexes only store extended (secondary + primary) keys on disk. To make them look like tuples, we fill missing fields with nulls (aka tuple surrogate). This isn't going to work nicely with multikey indexes though: how would you make a surrogate array from a key? We could special-case multikey index handling, but that would look cumbersome. So this patch removes nulls from secondary tuples restored from disk altogether. To achieve that, it's enough to use key_format for them - then the comparators will detect that it's actually a key, not a tuple and use the appropriate primitive.
Showing
- src/box/key_def.c 37 additions, 0 deletionssrc/box/key_def.c
- src/box/key_def.h 15 additions, 0 deletionssrc/box/key_def.h
- src/box/vinyl.c 36 additions, 12 deletionssrc/box/vinyl.c
- src/box/vy_lsm.c 22 additions, 9 deletionssrc/box/vy_lsm.c
- src/box/vy_lsm.h 9 additions, 4 deletionssrc/box/vy_lsm.h
- src/box/vy_run.c 21 additions, 10 deletionssrc/box/vy_run.c
- src/box/vy_stmt.c 16 additions, 16 deletionssrc/box/vy_stmt.c
- test/unit/vy_point_lookup.c 1 addition, 1 deletiontest/unit/vy_point_lookup.c
Loading
Please register or sign in to comment