| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
According to MattJ, leftovers from an earlier vision for util.sql
|
|
|
|
|
| |
Many leftovers from the earlier version of util.sql this was based on
and cleanup applied there since then.
|
|
|
|
|
|
| |
Shifting the index does not work reliably yet, better to rebuild it from
scratch. Since there is minimal parsing involved in that, it should be
more efficient anyway.
|
| |
|
|
|
|
|
| |
It gets closed eventually but at high load they could potentially
lead to reaching FD limits faster.
|
|
|
|
| |
In desperate need of tests
|
|
|
|
|
| |
Until we have more test coverage. Somehow the index becomes incorrect
after inserting padding, unclear why.
|
|\ |
|
| | |
|
|\| |
|
| |
| |
| |
| | |
Should detect things like misplaced settings inside modules_enabled
|
| |
| |
| |
| |
| |
| | |
The module API has certain coercion features that are useful.
Fixes traceback reported in #1812 and other duplicates
|
| |
| |
| |
| |
| | |
This adds a dependency on a binary and *nix-specific module but then
stty is probably *nix-specific anyway so maybe that's fine.
|
| |
| |
| |
| |
| | |
Notably 'h' was missing. Awkwardly, 'hour' would result in 'ho' which
was missing from table.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
By padding items so that they do not cross block boundaries, it becomes
eaiser to delete whole blocks with fallocate() without cutting items
in half, improving efficiency of such operations.
Since list stores are used for message archives, where the most common
deletion operation would be of the oldest entires, at the top of the
file. With this, all blocks that contain items to be removed could be
deleted without needing to read, delete and write out the whole file.
|
| |
| |
| |
| |
| | |
Using the new pposix.remove_blocks() it should be very performant to
delete whole sections of a file, given a supporting file system.
|
| |
| |
| |
| |
| | |
Copying data without parsing it should be more performant than parsing
it serializing back.
|
| |
| |
| |
| |
| |
| |
| |
| | |
If the first item does not start at position 0 then the index function
produces a phantom first entry covering position zero until where the
real first item starts. When using the index, this would make it either
appear as the first item was missing or cause an off-by-one issue with
remaining items.
|
| |
| |
| |
| |
| |
| | |
(thanks Trung)
These were mostly 'warn' to make them stand out from the debug noise
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Simplifies access to the cache without moving code around a lot given
the currently common pattern of
local some_cache = cache.new(size, function(k,v) end)
|
| |
| |
| |
| |
| | |
Previously either the old or the new values would be rejected, even if
the cache was resized to allow more items.
|
| | |
|
| |
| |
| |
| | |
This was to silence some Teal warning that seems to have gone away.
|
| |
| |
| |
| |
| |
| | |
Teal worries that we redefine the global.
Also that the fallback was missing type information.
|
| |
| |
| |
| |
| | |
Teal thinks that these are key-value maps which are always of length
zero, but that is not the case.
|
| |
| |
| |
| | |
These are gathered into arrays
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The :execute method is mainly used for one-off queries such as creating
tables and indices. There is no need to cache this prepared statement,
as those queries are only done on startup.
Further, prepared statements can't be reused without being reset, so
this was likely broken anyway.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There were 3 very similar methods:
- :execute()
- :execute_query()
- :execute_update()
The first one returns the prepared statement and is mainly used
internally in the library for CREATE statements.
The later two only really differ in how the results are returned.
Those two are one main method and one small one that only picks out the
iterator.
|
| | |
|
|\| |
|
| |
| |
| |
| |
| |
| | |
For consistency with other utils.
Consistency is good.
|
| |
| |
| |
| |
| | |
Instead of storing (start, length) tuples, store the offset to the end
of items and derive length using the previous entry.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Index file contains offsets and lengths of each item() which allows
seeking directly to each item and reading it without parsing the entire
file.
Also allows tricks like binary search, assuming items have some defined
order.
We take advantage of the 1-based indexing in tables to store a magic
header in the 0 position, so that table index 1 ends up at file index 1.
|
| |
| |
| |
| |
| | |
This is the config I want 90% of the time when just showing data in the
console or so.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Standardized and structured replacement for the X-Forwarded-For,
X-Forwarded-Proto set of headers.
Notably, this allows per-hop protocol information, unlike
X-Forwarded-Proto which is always a single value for some reason.
|
| |
| |
| |
| | |
Backs out 895a82c5d8d4 beacuse __freeze already added in a96a2fbcc6c0
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Where gethostname or tohostname returns an invalid name, e.g. containing
underscores or something, to_ascii would reject this and return nil,
which triggers an error in the dns lookup.
Reported by prova2 in the chat, for whom tohostname returned a long name
containing underscores.
|
| |
| |
| |
| |
| | |
Useful to have this info available when juggling metrics, e.g. to
see if things changed between versions.
|
| |
| |
| |
| | |
Module was removed in 0.8.0 in c52b06de9b27
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rationale: See diffstat
When this module is imported, it ends up calling stty via term_width()
in util.human.io.table(). When this happens outside of a terminal, the
following message is sent to stdout:
stty: 'standard input': Inappropriate ioctl for device
Not importing this module avoids that.
Furthermore three is value in this module having minimal dependencies as
they might not be available when it does the checks.
Ref a1fed82c44b9
|
| |
| |
| |
| |
| | |
Previously the kvsep before and after the kvpairs would have been
included in kvpairs, which is incorrect but should be harmless.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Like 'pattern' but uses Lua patterns instead of Regular Expressions,
since only a subset of regex are also valid Lua patterns.
|
| |
| |
| |
| |
| |
| |
| |
| | |
'patternProperties'
Previous version of this patch used 'patternProperties' but that would
only work with simpler ECMA-262 regular expressions are also valid Lua
patterns.
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Error stanzas should have an <error> element, but if you pass a
stanza without one to util.error.from_stanza() it triggers an attempt to
index a nil value, which this patch avoids.
In the conditional, it should be safe to assume error_tag is non-nil
since condition can't have those values then.
|
| |
| |
| |
| |
| |
| | |
Fixes that the more fixed width columns there are, the narrower the
resulting table becomes. A right-aligned variable-width column at the
last position should always be flush to the right side of the terminal.
|