tsbs icon indicating copy to clipboard operation
tsbs copied to clipboard

Support for MongoDB time-series collections

Open gregorynoma opened this issue 3 years ago • 9 comments

This adds support for MongoDB time-series collections, which are available starting in MongoDB 5.0. The changes include:

  • Switch from mgo to the official MongoDB Go driver
  • Add options to the MongoDB loader
    • --url
    • --document-per-event
    • --timeseries-collection
    • --retryable-writes
    • --ordered-inserts
    • --random-field-order
  • Add option to query generator
    • --mongo-use-naive
  • Move measurement data to the top level of inserted objects
  • Support queries using MongoDB naive data format

gregorynoma avatar Jul 14 '21 19:07 gregorynoma

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jul 14 '21 19:07 CLAassistant

Hello @gregorynoma ! thanks for the PR and all improvements related to mongodb! would you mind fixing the mongo test errors for the broken build?

# github.com/timescale/tsbs/pkg/query [github.com/timescale/tsbs/pkg/query.test]
1440pkg/query/mongo_test.go:23:20: cannot use "github.com/globalsign/mgo/bson".M literal (type "github.com/globalsign/mgo/bson".M) as type primitive.M in append
1441FAIL	github.com/timescale/tsbs/pkg/query [build failed]
1442?   	github.com/timescale/tsbs/pkg/query/config	[no test files]
1443?   	github.com/timescale/tsbs/pkg/query/factories	[no test files]
1444?   	github.com/timescale/tsbs/pkg/targets	[no test files]

jonatas avatar Aug 04 '21 18:08 jonatas

Hi @jonatas sorry about that, should be fixed now.

gregorynoma avatar Aug 06 '21 14:08 gregorynoma

Hey @jonatas, I added those files you suggested as well as incorporated some additional changes we made since the original PR!

gregorynoma avatar Jun 21 '22 16:06 gregorynoma

Thank you, @gregorynoma! I'll review it again!

jonatas avatar Jun 23 '22 13:06 jonatas

Hi All, Any updates on this? Looking forward to the benchmark results!

lcasassa avatar Dec 03 '23 10:12 lcasassa