[SERVER-78077] the log of getProductivityFormula function print inconsistency. Created: 14/Jun/23  Updated: 27/Oct/23  Resolved: 20/Jun/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: y yz Assignee: David Storch
Resolution: Gone away Votes: 0
Labels: pull-request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2023-06-14-21-56-43-423.png    
Issue Links:
Related
is related to SERVER-63641 Improve SBE multi-planning by choosin... Closed
Assigned Teams:
Query Execution
Operating System: ALL
Sprint: QE 2023-06-26
Participants:

 Description   
{"t":\{"$date":"2023-06-14T20:44:38.165+08:00"}

,"s":"D2", "c":"QUERY", "id":20961, "ctx":"conn149","msg":"Score formula","attr":{"formula":"score(1.5002) = baseScore(1) + productivity_((1 advances)/(1 numReads) = 0.5)_ + tieBreakers(0 noFetchBonus + 0.0001 noSortBonus + 0.0001 noIxisectBonus = 0.00020000000000000001)"}}

1/1=0.5,it is wrong。In fact, it is (0 + 1) / (1 + 1) = 0.5

 

in calculateProductivity func, add 1 to both the numerator and denominator, So we need to keep the results consistent



 Comments   
Comment by David Storch [ 20/Jun/23 ]

Thanks for raising this issue 1147952115@qq.com! As I mentioned in my response on the pull request, this is actually something that has already been fixed in the master and v7.0 branches. I've marked this ticket as related to SERVER-63641, since this issue was fixed as part of the changes for SERVER-63641.

We do not intend to pursue a backport of the fix to older release branches at this time. I am closing this ticket as "Gone Away" since the problem has already been resolved in more recent branches.

CC sebastien.mendez@mongodb.com anton.korshunov@mongodb.com

Comment by y yz [ 14/Jun/23 ]

the push code address:
https://github.com/mongodb/mongo/pull/1554

Comment by y yz [ 14/Jun/23 ]

Generated at Thu Feb 08 06:37:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.