Skip to content

Show that index creation is broken badly #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Show that index creation is broken badly #111

wants to merge 1 commit into from

Conversation

TomMD
Copy link

@TomMD TomMD commented Feb 9, 2020

This PR adds a test that shows the index creation is currently broken.

@TomMD
Copy link
Author

TomMD commented Feb 9, 2020

N.B. https://docs.mongodb.com/manual/reference/system-collections/

Starting in MongoDB 4.2, .system.indexes has been removed (access to the collection has been deprecated since 3.0). To list the inndexes, use the listIndexes command instead.

Other communities have had issues too, such as dart-mongodb.

Interestingly, even as far back as 3.6 this test still fails but for other reasons. In MongoDB 3.6 the test successfully creates the index but getIndex fails to reflect that change (index creation confirmed using mongo shell).

A quick wireshark of the mongoshell reveals it is using OP_MSG though despite staring at it I can't make heads or tails of the body section that appears to be included which causes creation of the index. Hopefully someone who works this project is already familiar.

@TomMD
Copy link
Author

TomMD commented Mar 31, 2020

PING! Is this project active? It seems the Haskell community has only Mongo (via this library) and cassandra available to it as NOSQL options.

@VictorDenisov
Copy link
Member

The project is maintained. If you have a fix I'll be happy to merge it.

@TomMD
Copy link
Author

TomMD commented Mar 31, 2020

Thanks @VictorDenisov - confirmation is good to hear. I'm using this library and feel there are multiple needs piling up that I'd like to deconflict with you and any plans you might already have. Before spewing all that out I'll note this PR was just to be up front about the status of things and was hoping it could merge regardless of a fix - more of a truth in advertising.

Thoughts for improving MongoDB + Haskell in 2020:

  1. It seems the library was built assuming network security was sufficient. This is not the case for some users, so brining the TLS support up to snuff and making it the default (even if that merely assumes the host's certificate chain) would be a huge step forward.
  2. The index creation is great in that it follows conventions already set forth by the rest of the library, but no longer functioning as this PR demonstrates. To bring this support up-to-date the new wire protocol will have to be supported.
  3. Storage and queries were good when written and remain operational for Mongo as of writing. However, the message formats are deprecated and not supported by all Mongo APIs. I'm speaking here of DocumentDB - while it might not be an explicit goal to support that DB if we can modernize the wire format to avoid future breakage then we'll get the DocumentDB as a bonus.

If all these sound reasonable to you then we can get to work addressing each issue.

@VictorDenisov
Copy link
Member

Sounds like a solid plan. I'm actually happy to help you. I was just a bit reluctant developing anything without clear use case and without any evidence that anybody needs it. I created a project called Development. Feel free to create issues in that project for tracking progress. If you could create granular enough tickets then I can pick them up and work on them.

@VictorDenisov
Copy link
Member

Hi @TomMD. Any movement on this PR? I presume this PR only demonstrates the problem and not fixes it.

@TomMD
Copy link
Author

TomMD commented Aug 13, 2021

Sorry, work took me on other paths. We're not using mongo right now. If we did then it would be lots of work to get both the new command format (to support document db) and index creation working.

You are right that this PR only shows the problem and does not fix it.

@TomMD TomMD closed this by deleting the head repository Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants