balderdashy / balderdashy/sails
Using CosmosDB instead of MongoDB cause Error
- Dominant language
- JavaScript
- Stars
- 22.8k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Hi, is there any chance to get CosmosDB working under Waterline ORM and sails-mongo adapter?
I just tried to only change the connection string with provided one from MS Azure pointing to CosmosDB instance, but some error shows up. Thanks for any information.
`{"message":"A hook (`orm`) failed to load!","level":"error","timestamp":"2020-03-27T15:34:04.327Z"}
{"level":"error","message":"Could not tear down the ORM hook. Error details:","timestamp":"2020-03-27T15:34:04.329Z"}
error:
error: Error: Consistency violation: Unexpected error creating db connection manager:
```
ImplementationError: Internal error occurred while running `createManager`. Got non-Error: { MongoError: connection 0 to mal-ms-tmdb.documents.azure.com:10255 timed out
at Function.MongoError.create (/Users/jn/Work/MALL/messaging/mg-ms-tmbe/node_modules/mongodb-core/lib/error.js:29:11)
at Socket. (/Users/jn/Work/MALL/messaging/mg-ms-tmbe/node_modules/mongodb-core/lib/connection/connection.js:188:20)
at Object.onceWrapper (events.js:273:13)
at Socket.emit (events.js:182:13)
at Socket.EventEmitter.emit (domain.js:442:20)
at Socket._onTimeout (net.js:449:8)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
name: 'MongoError',
message:
'connection 0 to mal-ms-tmdb.documents.azure.com:10255 timed out' }`
Contributor guide
Research direction
The issue names no repository files or tests. Start by reproducing the connection timeout with the Azure CosmosDB connection string and tracing the sails-mongo/Waterline path that creates the MongoDB connection manager. Done would require an identified compatibility fix or a confirmed, clearly documented limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, mongodb
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100