[COMPASS-3400] Schema Tab: Inconsistent Graph rendering result Created: 23/Jan/19  Updated: 17/Oct/22  Resolved: 17/Oct/22

Status: Closed
Project: Compass
Component/s: Schema
Affects Version/s: 1.16.3, 1.28.4
Fix Version/s: No version

Type: Bug Priority: Major - P3
Reporter: Wan Bachtiar Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2019-01-23 at 12.04.43 pm.png     PNG File Screen Shot 2019-01-23 at 12.05.14 pm.png     PNG File Screen Shot 2019-01-23 at 12.05.27 pm.png     PNG File Screen Shot 2019-01-23 at 12.05.37 pm.png    
Issue Links:
Related
Documentation Changes: Not Needed

 Description   

Compass Schema Analyser renders different graph result for a small dataset (less than 1000 documents).

Example data:

for(x=0;x<40;x++){db.test.insert({category:"foo"})}
for(x=0;x<24;x++){db.test.insert({category:"bar"})}
for(x=0;x<20;x++){db.test.insert({category:"baz"})}
for(x=0;x<15;x++){db.test.insert({category:"foz"})}
for(x=0;x<13;x++){db.test.insert({category:"for"})}
for(x=0;x<11;x++){db.test.insert({category:"bam"})}
for(x=0;x<9;x++){db.test.insert({category:"baw"})}
for(x=0;x<8;x++){db.test.insert({category:"bae"})}
for(x=0;x<7;x++){db.test.insert({category:"fog"})}
for(x=0;x<6;x++){db.test.insert({category:"com"})}
for(x=0;x<6;x++){db.test.insert({category:"cow"})}
for(x=0;x<5;x++){db.test.insert({category:"cop"})}
for(x=0;x<45;x++){db.test.insert({field:"some"})}

Test of manual $sample output:

db.test.aggregate([{$sample:{size:1000}}, {$group:{_id:"$category", count:{$sum:1}}}])

The should show that `foo` still outputs consistently of 40 documents. In Compass Schema, the percentage of value `foo` can range from 20%-28% (See screenshot)

Note that the bar shows : This report is based on a sample of 209 documents (100.00%)

MongoDB version: 4.0.5
Compass version: 1.16.3 Community



 Comments   
Comment by Jessica Sigafoos [ 17/Oct/22 ]

This is a valid issue, but the impact is low and we haven't had any user complaints.  Closing this as we're unlikely to get to it any time soon, we will revisit if it comes up again.

Generated at Wed Feb 07 22:33:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.