Project

General

Profile

Actions

Bug #43356

open

[clslua] Why clslua_map_get_keys returns lua table?

Added by Alexey Knyshev over 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
OSD
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

According to source code of clslua_map_get_keys function returns lua table (map) with original omap keys and true instead of all values. E.g. { a = true, c = true, e = true }

Proposal 1: return lua table in array format. E.g. { a, c, e }
Motivation: caller would expect getting array-like structure with original keys order preserved. Currently original order is not preserved.

Proposal 2: return unused `more` variable as second ret value of function to indicate end of omap.
Motivation: current way to determine if there any more keys left is not flexible. In edge case one have to make extra call to clslua_map_get_keys returning empty table to make sure that no keys left.

No data to display

Actions

Also available in: Atom PDF