pharo-nosql / mongotalk

A Pharo driver for MongoDB
MIT License
19 stars 13 forks source link

SDAM client (WIP) #62

Closed tinchodias closed 4 years ago

tinchodias commented 5 years ago

Related to issue #54

zecke commented 5 years ago

MongoSDAMTopologyType sharded doesn't seem to be defined?

tinchodias commented 5 years ago

MongoSDAMTopologyType sharded doesn't seem to be defined?

It's true

zecke commented 5 years ago
  1. Start a single mongod (so some tests will fail)
  2. Run Mongotalk tests (including SDAM)
  3. Click on one of the SDAM failures
  4. "Test took too long" exception will be shown.

The image is unusable after this. On the console I get

UnwindError
BlockClosure>>on:do:
BlockClosure>>ensure:
[ self value.
Processor terminateActive ] in BlockClosure>>newProcess in Block: [ self value....

CTRL+. doesn't get the image back in shape and the process sits there spinning 95% of the time. Now the question is if this is the test or the SDAM code. :)

and then run the SDAM tests. A lot of tests show as "failure". Click on a single test and re-e

tinchodias commented 5 years ago

For the moment, the SDAM client works only with a replica set mongo, and tests, more specifically, require to execute the (repo)/scripts/rs-setup.sh before. Sorry for not clarifying this before.

tinchodias commented 5 years ago

Also, I share a script that starts a client, steps down the primary server, and logs in Transcript what's going on "live", and finally prints a summary of what happened a (what state changes were noticed from the announcements). --> http://ws.stfx.eu/OFMWRX9R0IJQ

Spoowy commented 4 years ago

I'd love to have this! Currently not being able to connect to a sharded cluster.

tinchodias commented 4 years ago

@Spoowy the SDAM client I'm pushing soon will initially support replica set scenarios only (at least it's only tested on...), but it may be close... what's your opinion?

tinchodias commented 4 years ago

(when I read the SDAM specification and the mongodb docs, I skip the sections about sharded clusters, but I know it's related to replica sets)

Spoowy commented 4 years ago

Maybe replica sets will work for me, I will have to check, as my cluster is not truly "sharded" per se. Establishing a connection would allow me to prototype with Smalltalk for the first time on a project I'm working on. That would be fun!

tinchodias commented 4 years ago

I splitted part of these changes in #65, #66 and #67 and squashed remaining commits in a new branch... I'm closing this PR to start a new one in the other branch.

tinchodias commented 4 years ago

Maybe replica sets will work for me, I will have to check, as my cluster is not truly "sharded" per se. Establishing a connection would allow me to prototype with Smalltalk for the first time on a project I'm working on. That would be fun!

In the case you're still interested, @Spoowy, you could try #68.