Commit Graph

74 Commits

Author SHA1 Message Date
tidwall 46b9600683 Fix crash when mixing z-coord dimensionality in a geometry
See:
- #714
- https://github.com/tidwall/geojson/commit/dd1394f
2023-12-18 12:33:59 -07:00
tidwall 06cf6ebd67 Update dependencies 2023-11-20 07:33:10 -07:00
tidwall c0b8420a40 Update google.golang.org/grpc to 1.59.0 2023-11-20 07:27:08 -07:00
Josh Baker 249f1537f3
Merge branch 'master' into dependabot/go_modules/golang.org/x/net-0.17.0 2023-11-19 22:13:47 -07:00
dependabot[bot] a546b09daa
Bump github.com/nats-io/nkeys from 0.4.4 to 0.4.6
Bumps [github.com/nats-io/nkeys](https://github.com/nats-io/nkeys) from 0.4.4 to 0.4.6.
- [Release notes](https://github.com/nats-io/nkeys/releases)
- [Changelog](https://github.com/nats-io/nkeys/blob/main/.goreleaser.yml)
- [Commits](https://github.com/nats-io/nkeys/compare/v0.4.4...v0.4.6)

---
updated-dependencies:
- dependency-name: github.com/nats-io/nkeys
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-20 01:53:54 +00:00
dependabot[bot] fab27f1a8d
Bump github.com/nats-io/nats-server/v2 from 2.7.4 to 2.9.23
Bumps [github.com/nats-io/nats-server/v2](https://github.com/nats-io/nats-server) from 2.7.4 to 2.9.23.
- [Release notes](https://github.com/nats-io/nats-server/releases)
- [Changelog](https://github.com/nats-io/nats-server/blob/main/.goreleaser.yml)
- [Commits](https://github.com/nats-io/nats-server/compare/v2.7.4...v2.9.23)

---
updated-dependencies:
- dependency-name: github.com/nats-io/nats-server/v2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-19 16:15:31 +00:00
dependabot[bot] d396e27626
Bump golang.org/x/net from 0.7.0 to 0.17.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.7.0 to 0.17.0.
- [Commits](https://github.com/golang/net/compare/v0.7.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-11 23:26:37 +00:00
tidwall fd72c5e539 Update dependencies
Update golang.org/x/text and xdg-go/scram

Fixes #671
2023-05-11 03:46:33 -07:00
tidwall 05fbeabdb4 Add LRU cache for WHEREEVAL script
See #685
2023-05-11 03:18:18 -07:00
dependabot[bot] 44d8bced6e
Bump golang.org/x/net from 0.0.0-20220809184613-07c6da5e1ced to 0.7.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20220809184613-07c6da5e1ced to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/commits/v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-25 01:56:26 +00:00
tidwall bd8d8cdc77 Ensure case-insensitve compares 2022-11-22 07:41:33 -07:00
tidwall 6b8211c468 Fixed invalid BOUNDS result
This commit ensures that BOUNDS always returns Polygon.
2022-11-21 04:47:56 -07:00
tidwall 5ee2470558 Fix #664. Bad line in inner ring response 2022-11-11 13:39:43 -07:00
tidwall bfcd9fc94f Updaetd btree package 2022-11-03 09:42:26 -07:00
tidwall bdc80a7f70 Added WHERE expressions
It's now possible to do:

   SCAN fleet WHERE "properties.speed < 25 || properties.speed > 50"

Uses javascript-like syntax using the https://github.com/tidwall/expr package.

Automatically reference fields and GeoJSON properties:

   SET fleet truck1 FIELD speed 65 POINT -112 33

Can be queried:

   SCAN fleet WHERE "speed > 50"
   SCAN fleet WHERE "id == 'truck1'"
   SCAN fleet WHERE "speed > 50 && id == 'truck1'"
2022-10-20 17:01:12 -07:00
tidwall 2075bbeae4 Allow for queries GeoJSON properties
This commit allows for performing WHERE on the object's GeoJSON
properties member.

For example:

    SET fleet truck1 OBJECT '{"type":"Feature","geometry":{"type":"Point","coordinates":[-112,33]},"properties":{"speed":50}}'

You can now do:

    SCAN fleet WHERE properties.speed > 50
2022-10-20 14:26:34 -07:00
tidwall c093b041e1 Parallel integration tests 2022-09-26 13:26:46 -07:00
tidwall 40dddd2620 Update btree and minor optz 2022-09-21 18:29:01 -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
tidwall 3011b6ec45 Upgrade geojson dependency 2022-09-14 08:14:29 -07: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 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
tidwall 498bbe23ff Updated btree and rtree
This commit updates to the latest btree and rtree.

The rtree algorithm has been modified in `tidwall/rtree@v1.7`
which now keeps internal and leaf rect sorted by the min-x
coordinate. This make for much faster (up to 50%) faster
searches and replacements, but slightly slower inserts.

Because of the R-tree update, the tests needed to be updated to
account for the change in order for undeterministic WITHIN and
INTERSECTS commands.
2022-09-11 14:31:00 -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 fcdb469ee4 Security updates
github.com/nats-io/nats-server/v2 (CVE-2022-26652)
golang.org/x (CVE-2021-38561)
2022-03-16 12:13:44 -07:00
tidwall a124738a94 Upgrade to Go 1.18 2022-03-15 14:52:33 -07:00
tidwall 38ea913bb5 Upgrade prometheous client 2022-03-08 16:35:22 -07:00
tidwall 218200525b Upgrade nats dependencies 2022-03-08 16:21:15 -07:00
tidwall 45fde6a430 Upgrate nats package
CVE-2022-24450
2022-02-12 18:04:48 -07:00
tidwall 728c618a8a Updated dependencies 2021-12-28 16:56:01 -07: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 f3947407aa Upgrade gjson and btree 2021-12-08 16:33:10 -07:00
tidwall a47443a48c Upgrade tidwall modules 2021-10-25 15:12:23 -07:00
dependabot[bot] 8dffa06c3a
Bump github.com/tidwall/gjson from 1.8.1 to 1.9.3
Bumps [github.com/tidwall/gjson](https://github.com/tidwall/gjson) from 1.8.1 to 1.9.3.
- [Release notes](https://github.com/tidwall/gjson/releases)
- [Commits](https://github.com/tidwall/gjson/compare/v1.8.1...v1.9.3)

---
updated-dependencies:
- dependency-name: github.com/tidwall/gjson
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-25 21:57:00 +00:00
tidwall 11cea4d092 Remove vendor directory
In the past we needed to vendor out Go packages because there wasn't
a built-in Go package manager. That changed with Go Modules, which has
been stable for a while now. The Go Modules system will maintain
packages versions, handle the fetching, checksuming, and keep a
public cached of the source code.
2021-10-22 06:22:08 -07:00
Simon Tuohy 4454995e06 Azure EventHub hook support 2021-10-15 15:22:41 +01:00
Benjamin Ramser bc62edb692 feat: add sector 2021-09-05 11:48:34 +02:00
tidwall b7674349cf Updated btree library 2021-08-23 07:33:57 -07:00
tidwall 5c21d1277f Update buntdb 2021-08-04 14:47:09 -07:00
tidwall 17ab07bd3e Update tidwall dependencies 2021-07-31 07:45:09 -07:00
tidwall 694ad1fb62 Update btree/buntdb 2021-07-31 07:42:58 -07:00
tidwall afd77d9448 Update nats-server dependency
Dependabot alert
2021-07-29 17:23:41 -07:00
tidwall 9e68703841 Update expiration logic
This commit changes the logic for managing the expiration of
objects in the database.

Before: There was a server-wide hashmap that stored the
collection key, id, and expiration timestamp for all objects
that had a TTL. The hashmap was occasionally probed at 20
random positions, looking for objects that have expired. Those
expired objects were immediately deleted, and if there was 5
or more objects deleted, then the probe happened again, with
no delay. If the number of objects was less than 5 then the
there was a 1/10th of a second delay before the next probe.

Now: Rather than a server-wide hashmap, each collection has
its own ordered priority queue that stores objects with TTLs.
Rather than probing, there is a background routine that
executes every 1/10th of a second, which pops the expired
objects from the collection queues, and deletes them.

The collection/queue method is a more stable approach than
the hashmap/probing method. With probing, we can run into
major cache misses for some cases where there is wide
TTL duration, such as in the hours or days. This may cause
the system to occasionally fall behind, leaving should-be
expired objects in memory. Using a queue, there is no
cache misses, all objects that should be expired will be
right away, regardless of the TTL durations.

Fixes #616
2021-07-12 13:37:50 -07:00
tidwall e60cbac7cf Merge distance updates 2021-07-08 07:03:36 -07:00
Mathieu 55e503c378 Add sasl 2021-07-08 06:46:57 -07:00
tidwall 5b3aeb5db7 add prometheus metrics endpoint 2021-07-08 06:46:52 -07:00
tidwall 48b46f2752 Update btree 2021-07-08 06:46:13 -07:00