Commit Graph

282 Commits

Author SHA1 Message Date
tidwall 5c455cbe10 Better HEALTHZ tests 2022-09-23 17:34:09 -07:00
tidwall 5bcef43894 Better KEYS tests 2022-09-23 16:12:32 -07:00
tidwall 295a9c45a8 Better SET/PERSIST/TTL/STATS tests 2022-09-23 15:29:46 -07:00
tidwall 7fa2dc4419 Better FSET tests
Execute oom check immediately after setting maxmemory
2022-09-23 12:42:39 -07:00
tidwall d7ad01e593 Better FLUSHDB/EXPIRES tests 2022-09-23 11:40:48 -07:00
tidwall 960c860b3a Better RENAME/RENAMENX tests 2022-09-23 11:18:01 -07:00
tidwall ede1ce0269 Better GET/DROP tests 2022-09-23 10:42:43 -07:00
tidwall db380a4fee Better DEL/PDEL/TYPE tests 2022-09-23 09:04:01 -07:00
tidwall ef95f04aca Better coverage BOUNDS 2022-09-23 07:51:05 -07:00
tidwall a824d58419 Minor optimization to avoid unneeded field merging 2022-09-22 14:22:45 -07:00
tidwall a452d45a1e Merge fix follower auth fix 2022-09-22 04:46:18 -07:00
tidwall 0b2814d8e0 Fix follower not authenticating after an aofshrink 2022-09-21 18:44:09 -07:00
tidwall 40dddd2620 Update btree and minor optz 2022-09-21 18:29:01 -07:00
tidwall ac0f170477 Keep struct file in tree 2022-09-21 10:42:13 -07:00
tidwall 4b71083fae Binary objects 2022-09-21 10:40:37 -07:00
tidwall def9c173bf Remove created field 2022-09-21 10:03:53 -07:00
tidwall 2c643996e7 Immutable Object type 2022-09-20 14:20:53 -07:00
tidwall ba9a767988 Changed the collection rectangle dimension type
Previously used float64s, now using float32s.
Saving about 15% on rectangle memory.
Uses the Roundoff trick from Sqlite.
2022-09-19 17:51:14 -07:00
tidwall d5c148ca41 Field overhaul 2022-09-19 17:47:38 -07:00
Benjamin Ramser 33e8e28a83 feat: add distance to NEARBY IDS response 2022-09-17 11:02:20 +02:00
tidwall 1177bbb80c Moved root collection keys into generic btree.
Also updated the background expires logic to remove an extra
allocation.
2022-09-13 08:16:41 -07:00
tidwall dd11eded5c Cleanup code for Go 1.19 2022-09-12 17:06:27 -07:00
tidwall 023433a963 Fix server hang on shared address 2022-09-12 16:38:45 -07:00
tidwall cbfb271541 Updated data structures to use Go generics.
Prior to this commit all objects in the Collection data structures
were boxed in an Go interface{} which adds an extra 8 bytes per
object and requires assertion to unbox.

Go 1.18, released early 2022, introduced generics, which allows
for storing the objects without boxing. This provides a extra
boost in performance and lower in-memory footprint.
2022-09-12 09:12:51 -07:00
Benjamin Ramser 09ca96717b fix: allow host ca sets for SASL and TLS connections
?ssl=true previously would require the user to provide a cacertfile
stripping the option to use the hosts ca set.

bumping sarama to version 1.36.0
bumping alpine to 3.16.2

fix: tls path
2022-09-07 11:10:10 +02:00
tidwall f24c251ee6 Allow for multiple MATCH patterns
Each MATCH is inclusive OR, thus

    WITHIN fleet MATCH train* truck* BOUNDS 33 -112 34 -113

will find all trains and trucks that within the provides bounds.
2022-09-01 19:43:30 -07:00
tidwall 67916f38f8 Reset wheres while geofencing 2022-08-30 16:50:19 -07:00
tidwall cc9320e246 Allow for WHERE for on geofence detection 2022-08-26 16:23:28 -07:00
tidwall b883f358d5 Add pending_events stat 2022-07-11 08:39:40 -07:00
Erik Serating b256d4752b Issue #642 - Renamed config property to replica-priority and added config set/get functionality 2022-06-22 12:50:43 -04:00
Erik Serating 2be07e4762 Issue #642 - Expose config and INFO response for slave_priority 2022-06-20 09:50:40 -04:00
tidwall a1cc8e6e46 Fix eof error for incomplete commands.
This commit fixes an issue where Tile38 will fail to start
because the AOF file contains a partially written command, which
is caused by the server not having enough disk space to complete
the previous write.

This was discovered and reported by a Theresa D on the Tile38
Slack channel.
2022-04-12 15:43:55 -07:00
tidwall fc39090e94 Workaround for lettuce handshake to work.
Issue #636
2022-03-10 12:44:40 -07:00
tidwall 10f85640c0 Added option to "not found" for DEL 2022-03-08 15:58:23 -07:00
tidwall b6833a2dba Auto assign server_id for bootstrapped config files.
This commit fixes an issue where the server may start up without
a "server_id" assigned, which in turn will cause a follower to
be unable to connect.

This issues is caused by including a pre-generated "data/config"
file that does not include the "server_id" field.
2022-01-04 05:13:16 -07:00
tidwall 517bc57e9c Ensure inlined logs
Move the LogJSON check into the log function so that the caller
function can be inlined. This is helpful for hot functions like
`log.Debug` where it's likely that the `-vv` flag is not set thus
the to avoid the extra function call.
2021-12-28 16:33:46 -07:00
Benjamin Ramser bd5f8ddccd fix: disable caller 2021-12-28 11:18:44 +01:00
Benjamin Ramser 407fd4c71c refactor: set log encoding early 2021-12-27 12:20:14 +01:00
Benjamin Ramser 20cc624918 feat: add option to cmd, add default config
feat: add zap logger

test: add additional

refactor: dont export logger, use set/get/build

fix: getter and benchmark

feat: extend server config with log configuration

fix: log config write

fix: log
2021-12-26 16:06:34 +01:00
tidwall 241117c7ba Added BUFFER option for Within and Intersects
This commit allows for buffering any GeoJSON object.

For example:

    INTERSECTS fleet BUFFER 1000 OBJECT {...LineString...}

This will buffer add a 1 kilometer buffer to a linesting and
search the 'fleet' collection for all objects that
intersect the buffered linestring.

This commit also allows for performing INTERSECTS with a POINT
type. Thus allowing for a polygon-over-point operation, which is
an inverted point-in-polygon.
2021-12-09 18:14:50 -07:00
tidwall 29a6d05f3f Minor refactor 2021-12-09 09:24:26 -07:00
Simon Tuohy 4454995e06 Azure EventHub hook support 2021-10-15 15:22:41 +01:00
tidwall 9e552c3629 Allow some basic client commands before AOF data loads
This commit accepts incoming connections even before the AOF
dataset has been loaded into memory. Though only a very limited
command set is allowed.

Allowed commands:
  PING, ECHO, OUTPUT, QUIT

All other commands will return:
  LOADING Tile38 is loading the dataset in memory

This is useful for establishing connections for the purpose of
checking process and network state.
2021-10-01 17:18:07 -07:00
tidwall a3c808e97f Increase verbosity for warning messages 2021-10-01 07:45:37 -07:00
tidwall 6174c6434d Fix aofshrink panic
fixes #624
2021-09-29 11:15:53 -07:00
tidwall de59d23ac4 Fixed Z not matching on where clause Feature points.
This issues fixes an issue where a search command with a where
clause using the "z" field would not match correctly for point
that where contained inside a GeoJSON Feature type.

Tile38 now extracts the Z coordinate from Point and Feature/Point
types.

fixes #622
2021-09-29 07:19:00 -07:00
tidwall 19deea10c0 Use same input args for command functions 2021-09-29 07:19:00 -07:00
tidwall 7ff0d18868 Change hooks collection type from hashmap to btree
This commit changes the collection type that holds all of the
hooks from a hashmap to a btree. This allows for better
flexibility for operations that need to perform range searches
and scanning of the collection.
2021-09-29 07:19:00 -07:00
tidwall decafae2d7 Update hook expiration logic 2021-09-29 07:19:00 -07:00
tidwall 7e10a80319 Return hook ttl with HOOKS request 2021-09-29 07:19:00 -07:00