Skip to content

Releases: wekan/FerretDB

Release list

v1.25.0

Choose a tag to compare

@github-actions github-actions released this 10 Jul 19:32

FerretDB v1 (SQLite) multi-platform binaries — ferretdb.zip. Built by release-all.yml from the wekan/FerretDB fork.

v1.25.0 (2026-07-10)

New Features 🎉

  • Implement the replSetInitiate command as a compatibility no-op so that tools and drivers that bootstrap a replica set do not hard-fail: the command is accepted with or without a configuration document ({replSetInitiate: 1} or {replSetInitiate: {_id: "rs0", members: [...]}}) and returns {ok: 1}, echoing back the configuration _id (replica set name) when one is supplied. IMPORTANT: this does NOT set up real replication — FerretDB v1's oplog is tailing-only and must still be configured manually by creating a capped local.oplog.rs collection and setting the FERRETDB_REPL_SET_NAME environment variable; the command creates no oplog, elects no primary and does not change server topology by @xet7 in ed98fa8 . Thanks to xet7.
  • Implement the logical session and transaction command family as compatibility commands so MongoDB drivers (and Meteor) that rely on sessions and retryable writes work against the SQLite backend: startSession returns a session record with a freshly generated UUID, and commitTransaction, abortTransaction, endSessions, refreshSessions, killSessions, killAllSessions and killAllSessionsByPattern return {ok: 1}. The ordinary write commands (insert, update, delete, findAndModify) now also accept and ignore the retryable-write / session fields autocommit, startTransaction, stmtId and stmtIds in addition to the already-accepted lsid and txnNumber. IMPORTANT: these transaction commands are NO-OP compatibility commands — FerretDB v1 with the SQLite backend has no real multi-document transactions, every write auto-commits on its own, and the commands provide no atomicity or isolation across operations (abortTransaction does not roll back writes that already happened); logical sessions are accepted but carry no server-side state by @xet7 in c229095 . Thanks to xet7.
  • Track logical sessions in a real server-side session registry (ported and adapted from FerretDB v2's internal/handler/session package) instead of treating the session commands as pure no-ops: the handler now owns a session.Registry that creates and looks up sessions by lsid, groups them per user, records their created and last-used times, marks sessions as ended and prunes ended/expired sessions after the 30-minute LogicalSessionTimeoutMinutes. startSession registers a fresh session, endSessions marks the referenced sessions ended, refreshSessions bumps their last-used time (creating them implicitly if needed), and killSessions, killAllSessions and killAllSessionsByPattern remove the referenced sessions from the registry — all still returning {ok: 1}. The v2 cursor-association tracking is intentionally omitted because v1's cursor registry differs, so the port keeps the session lifecycle only. IMPORTANT: this only tracks session bookkeeping — multi-document transactions remain NO-OP compatibility commands, as FerretDB v1 with the SQLite backend auto-commits every write and provides no atomicity or isolation by @xet7 in 166770d . Thanks to xet7.
  • Implement the $setWindowFields aggregation stage together with the window operators $rank, $denseRank, $documentNumber and $shift (rank/position, requiring sortBy) and the window accumulators $sum, $avg, $min, $max, $count, $push, $first, $last, $stdDevPop and $stdDevSamp (over the default full-partition window or an explicit window: {documents: [lower, upper]} with integer offsets and the "unbounded"/"current" keywords). The window operators $derivative, $integral, $expMovingAvg, $covariancePop, $covarianceSamp, $linearFill, $locf, $minN/$maxN and range windows are deferred and return a clear not-implemented error by @xet7 in 540de30 . Thanks to xet7.
  • Implement the $slice, $sort and $position modifiers for the $push update operator (used by WeKan) by @xet7. Thanks to xet7.
  • Implement the $eq, $ne, $or, $ifNull, $anyElementTrue, $objectToArray and $map aggregation expression operators used by WeKan by @xet7. Thanks to xet7.
  • Implement the $cmp, $gt, $gte, $lt, $lte, $and, $not, $cond, $switch and $allElementsTrue aggregation expression operators by @xet7. Thanks to xet7.
  • Implement the arithmetic aggregation expression operators $add, $subtract, $multiply, $divide, $mod, $abs, $ceil, $floor, $trunc, $round, $pow, $sqrt, $exp, $ln, $log, $max, $min and $avg by @xet7. Thanks to xet7.
  • Implement the trigonometric, hyperbolic, angle-conversion and $log10 aggregation expression operators $sin, $cos, $tan, $asin, $acos, $atan, $atan2, $sinh, $cosh, $tanh, $asinh, $acosh, $atanh, $degreesToRadians, $radiansToDegrees and $log10 by @xet7 in 62a683e . Thanks to xet7.
  • Implement the $bsonSize aggregation expression operator, which returns the size in bytes of the BSON encoding of a document (null for a null argument) by @xet7 in 84d798e . Thanks to xet7.
  • Implement the string aggregation expression operators $concat, $toUpper, $toLower, $strLenCP, $strLenBytes, $strcasecmp, $substr, $substrCP, $substrBytes, $split, $trim, $ltrim, $rtrim, $indexOfCP, $indexOfBytes, $replaceOne, $replaceAll and $regexMatch by @xet7. Thanks to xet7.
  • Implement the array aggregation expression operators $size, $arrayElemAt, $concatArrays, $isArray, $in, $reverseArray, $slice, $range, $indexOfArray, $arrayToObject, $filter, $reduce, $sortArray, $setUnion, $setIntersection, $setDifference, $setEquals, $setIsSubset and $zip by @xet7. Thanks to xet7.
  • Implement the type-conversion aggregation expression operators $toString, $toInt, $toLong, $toDouble, $toBool, $toObjectId, $toDate, $convert, $isNumber, $literal, $let, $getField, $setField, $unsetField, $binarySize and $rand by @xet7. Thanks to xet7.
  • Implement the date aggregation expression operators $year, $month, $dayOfMonth, $hour, $minute, $second, $millisecond, $dayOfWeek, $dayOfYear, $week, $isoDayOfWeek, $isoWeek, $isoWeekYear, $dateToString, $dateFromString, $dateToParts, $dateFromParts, $dateAdd, $dateSubtract, $dateDiff and $dateTrunc by @xet7. Thanks to xet7.
  • Implement the $lookup aggregation stage (basic equality-join form) used by WeKan by @xet7. Thanks to xet7.
  • Implement the $replaceRoot, $replaceWith, $sortByCount and $sample aggregation stages by @xet7. Thanks to xet7.
  • Implement the $facet aggregation stage (multi-sub-pipeline) by @xet7. Thanks to xet7.
  • Implement the $unionWith aggregation stage (with optional sub-pipeline) by @xet7. Thanks to xet7.
  • Implement the $bucket and $bucketAuto aggregation stages (the $bucketAuto granularity option is not yet supported) by @xet7. Thanks to xet7.
  • Implement TTL indexes (expireAfterSeconds on createIndexes, reported by listIndexes, with a background reaper that deletes expired documents) by @xet7. Thanks to xet7.
  • Implement the $where query operator, which evaluates a JavaScript expression or function against each document (with this bound to the document) using the embedded pure-Go goja JavaScript engine by @xet7 in dd4dafe . Thanks to xet7.
  • Implement the $function aggregation expression operator ({body, args, lang: "js"}), which runs a user-supplied JavaScript function over the evaluated argument expressions using the embedded pure-Go goja JavaScript engine by @xet7 in dd4dafe . Thanks to xet7.
  • Implement text indexes: createIndexes now accepts the "text" index key value and the weights, default_language, language_override and textIndexVersion options, storing them so the index is created and round-tripped through listIndexes (weights default to 1 per field). Note that this is a pragmatic implementation for compatibility: no real inverted/full-text index is built by @xet7 in 21ed802 . Thanks to xet7.
  • Implement the $text query operator with partial, self-contained semantics: it matches the $search terms directly against a document's string fields (recursing into sub-documents and arrays) and supports multi-term OR, case-insensitive whole-word matching, $caseSensitive, double-quoted phrases and leading - negation; $language and $diacriticSensitive are accepted and ignored. There is no stemming, no relevance scoring and no $meta: "textScore" projection by @xet7 in 21ed802 . Thanks to xet7.
  • Accept the hidden, collation, partialFilterExpression and 2dsphere index options on createIndexes: hidden (bool), collation (document) and partialFilterExpression (document) are stored and round-tripped through listIndexes, and the "2dsphere" index key value together with 2dsphereIndexVersion is accepted and reported (version defaulting to 3). These options are only accepted, stored and reported — FerretDB does not hide indexes from the query planner, does not apply locale...
Read more