MARTIMM / raku-mongodb-driver

MongoDB driver for Raku
Artistic License 2.0
18 stars 8 forks source link

Add support for mongoDB 6.0 #32

Open Zer0-Tolerance opened 1 year ago

Zer0-Tolerance commented 1 year ago

This driver is using a deprecated OP_QUERY operation that is not anymore supported by MongoDB 6.0. Can you update the driver to use OP_MSG instead which is the new supported method see this

MARTIMM commented 1 year ago

I did use OP_QUERY for the find operation. If that is going away I will have to change that. It will take a bit of time to accomplish that though because I've used it in several places and I need to build in some warnings perhaps when older versions pass.

Zer0-Tolerance commented 1 year ago

thanks for you reply, let me know if you want to do some testing.

MARTIMM commented 1 year ago

I've set up the test environment and have noticed a few problems already starting from version 4.4.18. And it completely fails at version 6.0.3.

Zer0-Tolerance commented 1 year ago

great news , hopefully you can now improve it to make it more compatible with recent versions !

MARTIMM commented 1 year ago

After making many mistakes and having wrong ideas for implementing it I am now able to get some communication going with this new protocol. It needs more thorough testing so it will not yet be available, unfortunately.

MARTIMM commented 1 year ago

Pushed a new version today. @Zer0-Tolerance: Hopefully, it does what you want it to do. :-)

Zer0-Tolerance commented 1 year ago

Great thank you very much ! I'll do some testing.

MARTIMM commented 1 year ago

I am afraid that there are still errors here and there......

MARTIMM commented 1 year ago

I have solved the problem. The new version is 0.43.22.

MARTIMM commented 1 year ago

Hi @Zer0-Tolerance, is everything ok? If so, I can close the issue.

Zer0-Tolerance commented 1 year ago

Hi, I've been doing a lot of testing lately , I've been getting a lot wire exception when using a replica set but I'm not sure this is related to the Mongo 6.0 version. I'm also trying to improve the performance in order to get more insert/update per seconds. Any idea ? I'll create another issue to discuss this further.

MARTIMM commented 1 year ago

@Zer0-Tolerance - I've reopened this issue to explore this further. Previously I had some testing for replica sets but didn't run those for the new version yet. I will look into it.

Zer0-Tolerance commented 1 year ago

here is the error I'm getting the most:

--------------------------------------------------------------------------------
2023-01-30 07:48 UTC

28.470756 [E][11][Wire][433]: No response from server
28.478158 [E][11][Wire][40]: No data returned from server

--------------------------------------------------------------------------------
2023-01-30 07:58 UTC

46.403605 [E][12][Wire][433]: No response from server
46.412685 [E][12][Wire][40]: No data returned from server

--------------------------------------------------------------------------------
2023-01-30 08:09 UTC

06.797125 [E][9][Wire][433]: No response from server
06.801082 [E][9][Wire][40]: No data returned from server

--------------------------------------------------------------------------------
2023-01-30 08:19 UTC

16.140808 [E][7][Wire][433]: No response from server
16.143359 [E][7][Wire][40]: No data returned from server

--------------------------------------------------------------------------------
2023-01-30 08:29 UTC

26.026701 [E][12][Wire][433]: No response from server
26.029183 [E][12][Wire][40]: No data returned from server

--------------------------------------------------------------------------------
2023-01-30 08:39 UTC

43.752207 [E][10][Wire][433]: No response from server
43.763252 [E][10][Wire][40]: No data returned from server

--------------------------------------------------------------------------------
2023-01-30 08:49 UTC

50.167753 [E][13][Wire][433]: No response from server
50.170107 [E][13][Wire][40]: No data returned from server

--------------------------------------------------------------------------------
2023-01-30 09:00 UTC

00.423076 [E][7][Wire][433]: No response from server
00.432710 [E][7][Wire][40]: No data returned from server

--------------------------------------------------------------------------------
2023-01-30 09:10 UTC

21.997683 [E][9][Wire][433]: No response from server
22.001528 [E][9][Wire][40]: No data returned from server

--------------------------------------------------------------------------------
2023-01-30 09:20 UTC

40.257417 [E][9][Wire][433]: No response from server
40.267276 [E][9][Wire][40]: No data returned from server

--------------------------------------------------------------------------------
2023-01-30 09:30 UTC

57.607311 [E][9][Wire][433]: No response from server
57.610337 [E][9][Wire][40]: No data returned from server

I'm getting this even when I'm not actually trying to query the MONGODB server, if I just let my program running waiting for data I can get this from time to time.

What I don't know is does this means I'm losing data when I get this error or is the driver automatically retrying the query until success ?

MARTIMM commented 1 year ago

difficult to see where it is caused without more info. at the moment working on #33 and making progress. If this is about the working of the same program, then there is no need to put energy into it here.

I have a lot to tell you when I am finished there, there are quite a few mistakes but also run into a problem now I need to solve in the MongoDB Raku code.