{"id":19177000,"url":"https://github.com/joomcode/mongo-plan-checker","last_synced_at":"2025-08-22T11:06:59.778Z","repository":{"id":47012227,"uuid":"217264787","full_name":"joomcode/mongo-plan-checker","owner":"joomcode","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-23T16:34:07.000Z","size":308,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":76,"default_branch":"master","last_synced_at":"2025-01-04T02:31:45.534Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joomcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-24T09:43:46.000Z","updated_at":"2021-12-19T11:43:30.000Z","dependencies_parsed_at":"2024-11-09T10:33:07.844Z","dependency_job_id":"8ad5660a-a84f-40ce-865c-8fd064ba172c","html_url":"https://github.com/joomcode/mongo-plan-checker","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joomcode%2Fmongo-plan-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joomcode%2Fmongo-plan-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joomcode%2Fmongo-plan-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joomcode%2Fmongo-plan-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joomcode","download_url":"https://codeload.github.com/joomcode/mongo-plan-checker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240254293,"owners_count":19772393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T10:31:34.269Z","updated_at":"2025-02-23T01:17:01.819Z","avatar_url":"https://github.com/joomcode.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Github Actions Status](https://github.com/joomcode/mongo-plan-checker/workflows/CI/badge.svg)](https://github.com/joomcode/mongo-plan-checker/actions)\n\nHave you ever bring you mongo cluster to its knees rolling update with a query COLLSCAN-ing some collection?\nThis small library can prevent this. \n\nUse these wrappers for mongo-drivers in tests (you write tests for your \ncode, aren't you?) and they will fail on collscans, sorts (for frequent queries it is preferred to have \nindex ordering documents without need for separate heavy sort stage), excess reads (filtering too many \ndocuments read from disk and returning only a few) and broadcasts (if you have sharded mongodb cluster \nyou don't want every your query to hit all shards)\n\nThis is done using separate explain query before executing the real one. So this is not applicable for higload\nproduction environment.\n\n# Usage\nCurrently you can get it from [jitpack.io](https://jitpack.io/)\n\nDepending on what driver you use you need \n- `com.joom.mongo-plan-checker:mongo-plan-checker-sync42` that wraps `mongodb-driver-sync` version 4.2.x-4.x (latest supported)\n- `com.joom.mongo-plan-checker:mongo-plan-checker-sync4` that wraps `mongodb-driver-sync` version 4.0.x-4.1.x\n- `com.joom.mongo-plan-checker:mongo-plan-checker-sync` that wraps `mongodb-driver-sync` version 3.x\n- `com.joom.mongo-plan-checker:mongo-plan-checker-reactivestreams42` that wraps `mongodb-driver-reactivestreams` version 4.2.x-4.x (latest supported)\n- `com.joom.mongo-plan-checker:mongo-plan-checker-reactivestreams4` that wraps `mongodb-driver-reactivestreams` version 4.0.x-4.1.x\n- `com.joom.mongo-plan-checker:mongo-plan-checker-reactivestreams` that wraps `mongodb-driver-reactivestreams` version 1.x\n- `com.joom.mongo-plan-checker:mongo-plan-checker-async` that wraps `mongodb-driver-async` (that is an old driver deprecated in favor of reactivestreams)\n\nOr you may use our extensions for spring-data\n- `com.joom.mongo-plan-checker:mongo-plan-checker-sync-spring-data2` for spring-data version 2.x (used in spring-boot 2.2.x)\n\n   and activate it similar to our sample [spring-boot22-sample](samples/spring-boot22-sync/src/test/java/com/joom/mongoplanchecker/sync/sample/PlanCheckerConfig.java) \n- `com.joom.mongo-plan-checker:mongo-plan-checker-sync-spring-data3` for spring-data version 3.0.x and 3.1.x (used in spring-boot 2.3.x and 2.4.x)\n\n   and activate it similar to our sample [spring-boot23-sample](samples/spring-boot23-sync/src/test/java/com/joom/mongoplanchecker/sync/sample/PlanCheckerConfig.java) \n- `com.joom.mongo-plan-checker:mongo-plan-checker-sync-spring-data32` for spring-data version 3.2.x and onwards (used in spring-boot 2.5.x and 2.6.x)\n\n  and activate it similar to our sample [spring-boot25-sample](samples/spring-boot25-sync/src/test/java/com/joom/mongoplanchecker/sync/sample/PlanCheckerConfig.java)\n- `com.joom.mongo-plan-checker:mongo-plan-checker-reactivestreams-spring-data2` for spring-data version 2.x (used in spring-boot 2.2.x)\n\n   and activate it similar to our sample [spring-boot22-reactive-sample](samples/spring-boot22-reactive/src/test/java/com/joom/mongoplanchecker/reactivestreams/sample/PlanCheckerConfig.java)\n- `com.joom.mongo-plan-checker:mongo-plan-checker-reactivestreams-spring-data3` for spring-data version 3.0.x and 3.1.x (used in spring-boot 2.3.x and 2.4.x)\n\n   and activate it similar to our sample [spring-boot23-reactive-sample](samples/spring-boot23-reactive/src/test/java/com/joom/mongoplanchecker/reactivestreams/sample/PlanCheckerConfig.java)\n- `com.joom.mongo-plan-checker:mongo-plan-checker-reactivestreams-spring-data32` for spring-data version 3.2.x and onwards (used in spring-boot 2.5.x and 2.6.x)\n\n  and activate it similar to our sample [spring-boot25-reactive-sample](samples/spring-boot25-reactive/src/test/java/com/joom/mongoplanchecker/reactivestreams/sample/PlanCheckerConfig.java)\n\n# Contributing\nYou are welcome!\n### Building\n- Ensure docker is installed and available for current user\n- `./mvnw clean verify`\n- Code formatting is enforced with [google-java-format](https://github.com/google/google-java-format).\nYou may ensure code is properly formatted with `./mvnw com.coveo:fmt-maven-plugin:format`\n### Tag new release\n* `./mvnw release:prepare`\n* `git clean -f`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoomcode%2Fmongo-plan-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoomcode%2Fmongo-plan-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoomcode%2Fmongo-plan-checker/lists"}