AlekSi
Repos
402
Followers
605
Following
132

A truly Open Source MongoDB alternative

4977
183

A better ORM for Go, based on non-empty interfaces and code generation.

1351
67

Go package pointer provides helpers to get pointers to values of built-in types.

182
17

MySQL driver for Go's (golang) database/sql package and MySQL X Protocol

10
4

A web site of the GolangShow podcast.

52
13

GopherCon Russia talks

155
13

Events

Update corpus

Created at 13 hours ago

Fix parsing of OP_MSG packets with multiple sections (#1633)

Sections of kind 0 should be considered first.

Closes #1632.

Created at 13 hours ago
closed issue
Multiple sections are not set correctly in an `OP_MSG` packet

Versions

v0.7.0-5-gd715de2

What did you do?

It seems for multiple sections kind 1 is always set first which results in us using the section.Identifier as the command request. I did try to hack this by explicitly setting kind 0 in the result first, however task all failed with a lot of errors after that.

What did you expect to see?

Acknowledged writes.

What did you see instead?

Body diff:
--- res body
+++ proxy body
@@ -1,4 +1,4 @@
 {
-  "Checksum": 0,
-  "FlagBits": 0,
+  "Checksum": 3646467550,
+  "FlagBits": 1,
   "Sections": [
@@ -7,13 +7,9 @@
         "$k": [
-          "ok",
-          "errmsg",
-          "code",
-          "codeName"
+          "n",
+          "ok"
         ],
+        "n": 1,
         "ok": {
-          "$f": 0
-        },
-        "errmsg": "no such command: 'documents'",
-        "code": 59,
-        "codeName": "CommandNotFound"
+          "$f": 1
+        }
       },
Created at 13 hours ago
delete branch
AlekSi delete branch fix-order
Created at 13 hours ago
pull request closed
Fix parsing of `OP_MSG` packets with multiple sections

Description

Sections of kind 0 should be considered first.

Closes #1632.

Readiness checklist

  • [x] I added tests for new functionality or bugfixes.
  • [x] I ran task all, and it passed.
  • [ ] I added/updated comments for both exported and unexported top-level declarations (functions, types, etc).
  • [ ] I checked comments rendering with task godocs.
  • [x] I ensured that the title is good enough for the changelog.
  • [x] (for maintainers only) I set Reviewers (@FerretDB/core), Assignee, Labels, Project and project's Sprint fields.
  • [x] I marked all done items in this checklist.
Created at 13 hours ago
pull request opened
Fix parsing of `OP_MSG` packets with multiple sections

Description

Sections of kind 0 should be considered first.

Closes #1632.

Readiness checklist

  • [x] I added tests for new functionality or bugfixes.
  • [x] I ran task all, and it passed.
  • [ ] I added/updated comments for both exported and unexported top-level declarations (functions, types, etc).
  • [ ] I checked comments rendering with task godocs.
  • [x] I ensured that the title is good enough for the changelog.
  • [x] (for maintainers only) I set Reviewers (@FerretDB/core), Assignee, Labels, Project and project's Sprint fields.
  • [x] I marked all done items in this checklist.
Created at 16 hours ago
create branch
AlekSi create branch fix-order
Created at 16 hours ago

Update corpus

Created at 16 hours ago

Use consistent order

Created at 19 hours ago

Fix .deb/.rpm package testing (#1631)

Created at 21 hours ago
delete branch
AlekSi delete branch fix-packages
Created at 21 hours ago
pull request closed
Fix `.deb`/`.rpm` package testing

Description

It was broken by switching runners to Ubuntu 22.04.

Readiness checklist

  • [ ] I added tests for new functionality or bugfixes.
  • [x] I ran task all, and it passed.
  • [ ] I added/updated comments for both exported and unexported top-level declarations (functions, types, etc).
  • [ ] I checked comments rendering with task godocs.
  • [x] I ensured that the title is good enough for the changelog.
  • [x] (for maintainers only) I set Reviewers (@FerretDB/core), Assignee, Labels, Project and project's Sprint fields.
  • [x] I marked all done items in this checklist.
Created at 21 hours ago

WIP

Created at 22 hours ago
pull request opened
Fix `.rpm` package testing

Description

It was broken by switching runners to Ubuntu 22.04.

Readiness checklist

  • [ ] I added tests for new functionality or bugfixes.
  • [ ] I ran task all, and it passed.
  • [ ] I added/updated comments for both exported and unexported top-level declarations (functions, types, etc).
  • [ ] I checked comments rendering with task godocs.
  • [ ] I ensured that the title is good enough for the changelog.
  • [ ] (for maintainers only) I set Reviewers (@FerretDB/core), Assignee, Labels, Project and project's Sprint fields.
  • [ ] I marked all done items in this checklist.
Created at 22 hours ago
create branch
AlekSi create branch fix-packages
Created at 22 hours ago

Bump Go and other deps (#1629)

Refactor integration tests setup functions (#1625)

We need this change in order to simplify setup functions code and add TLS later on in #1615.

Created at 22 hours ago
delete branch
AlekSi delete branch golang
Created at 1 day ago

Bump Go to 1.19.4 (#123)

Created at 1 day ago
pull request closed
Bump Go to 1.19.4
Created at 1 day ago
issue comment
Remove `types.Incomparable`

So this one is about filtering and not about comparison

This issue is about removing types.Incomparable. That value is returned only by types.Compare. This issue is mostly about the comparison.

If I understand correctly, we must filter so we never call (5, "bar") for this specific example.

No. Let's say we run find command with filter argument being equal to {"foo": {$lt: 5}}. We fetch documents and call common.FilterDocument(doc, filter). That function should return true if doc matches filter, and false otherwise. It eventually calls types.Compare(doc.Get("foo"), 5) and compares the result with types.Less:

if types.Compare(doc.Get("foo"), 5) == types.Less {
  return true
}

doc.Get("foo") might return a "bar" string, so we do call types.Compare("bar", 5).

Created at 1 day ago
issue comment
Remove `types.Incomparable`

if we compare {"foo": {$lt: 5}} on value {"foo": "bar"}

We never compare (using types.Compare) those two values. In this example, types.Compare is called with (5, "bar").

string and number cannot be compared

Any two values can be compared. In this case, 5 < "bar" due to types order: https://www.mongodb.com/docs/manual/reference/bson-type-comparison-order/

Created at 1 day ago

Bump Go and other deps (#1629)

Created at 1 day ago
delete branch
AlekSi delete branch bump
Created at 1 day ago
pull request closed
Bump Go and other deps

Readiness checklist

  • [ ] I added tests for new functionality or bugfixes.
  • [x] I ran task all, and it passed.
  • [ ] I added/updated comments for both exported and unexported top-level declarations (functions, types, etc).
  • [ ] I checked comments rendering with task godocs.
  • [x] I ensured that the title is good enough for the changelog.
  • [x] (for maintainers only) I set Reviewers (@FerretDB/core), Assignee, Labels, Project and project's Sprint fields.
  • [x] I marked all done items in this checklist.
Created at 1 day ago
pull request opened
Bump Go and other deps

Readiness checklist

  • [ ] I added tests for new functionality or bugfixes.
  • [x] I ran task all, and it passed.
  • [ ] I added/updated comments for both exported and unexported top-level declarations (functions, types, etc).
  • [ ] I checked comments rendering with task godocs.
  • [x] I ensured that the title is good enough for the changelog.
  • [x] (for maintainers only) I set Reviewers (@FerretDB/core), Assignee, Labels, Project and project's Sprint fields.
  • [x] I marked all done items in this checklist.
Created at 1 day ago
create branch
AlekSi create branch bump
Created at 1 day ago

Compare unit tests for edge cases (#1624)

Add test cases for multiple sections in an OpMsg (#1611)

Closes #264.

Created at 1 day ago
pull request opened
Bump Go to 1.19.4
Created at 1 day ago
create branch
AlekSi create branch golang
Created at 1 day ago

Bump Wrangler to 2.6.1

Created at 1 day ago