Skip to content
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

Implement index report functions #4033

Merged
merged 1 commit into from
Jul 25, 2022

Conversation

noahshaw11
Copy link
Contributor

@noahshaw11 noahshaw11 commented May 20, 2022

Overview

Implement index report functions to facilitate memory leak detections.

Testing recommendations

Related Issues or Pull Requests

Checklist

@noahshaw11
Copy link
Contributor Author

noahshaw11 commented Jun 3, 2022

I also want to clarify the need for a print_report function on top of the existing print_table function. If the print_table function is used, the following is printed:

> couch_mrview_debug:view_report().
|                       info                       |                                                                                           signature
|                     signature                    |                                                                    39b98489b79419503499bbee402040c7
|                       info                       |                                                                                             db_name
|                      db_name                     |                                                            shards/00000000-ffffffff/dbv1.1654270700
|                       info                       |                                                                                            idx_name
|                      idx_name                    |                                                                                    _design/dbv1ddoc
|                       info                       |                                                                                         reduce_funs
|                    reduce_funs                   |
|                       info                       |                                                                                                 def
|                        def                       |                                                                     function(doc){emit(doc.id, 1);}
|                       info                       |                                                                                          update_seq
|                     update_seq                   |                                                                                                   3
|                       info                       |                                                                                           purge_seq
|                     purge_seq                    |                                                                                                   0
|                       info                       |                                                                                      view_file_path
|                   view_file_path                 |1/data/.shards/00000000-ffffffff/dbv1.1654270700_design/mrview/39b98489b79419503499bbee402040c7.view
|                       info                       |                                                                                     pending_updates
|                  pending_updates                 |                                                                                                   0
[ok,ok,ok,ok,ok,ok,ok,ok,ok]

On the other hand, if print_report is used, the following is printed:

> couch_mrview_debug:view_report().
|                       info                       |                                                                                               value
|                     signature                    |                                                                    39b98489b79419503499bbee402040c7
|                      db_name                     |                                                            shards/00000000-ffffffff/dbv1.1654270218
|                      idx_name                    |                                                                                    _design/dbv1ddoc
|                    reduce_funs                   |
|                        def                       |                                                                     function(doc){emit(doc.id, 1);}
|                     update_seq                   |                                                                                                   3
|                     purge_seq                    |                                                                                                   0
|                   view_file_path                 |1/data/.shards/00000000-ffffffff/dbv1.1654270218_design/mrview/39b98489b79419503499bbee402040c7.view
|                  pending_updates                 |                                                                                                   0
[ok,ok,ok,ok,ok,ok,ok,ok,ok]

Also, I think it would be a good idea to truncate the view_file_path in some form.

@noahshaw11 noahshaw11 force-pushed the implement-view_report-function branch 3 times, most recently from c640734 to 7cec072 Compare June 7, 2022 16:20
@noahshaw11 noahshaw11 changed the base branch from 3.x to main June 7, 2022 20:53
@noahshaw11 noahshaw11 force-pushed the implement-view_report-function branch from 44cd45e to 85b15be Compare June 7, 2022 20:53
@noahshaw11 noahshaw11 force-pushed the implement-view_report-function branch 6 times, most recently from c81580e to 1ca9d1a Compare July 5, 2022 20:48
@iilyak
Copy link
Contributor

iilyak commented Jul 8, 2022

Looks really good. Just a few small improvements left. Mostly in documentation.

@noahshaw11 noahshaw11 force-pushed the implement-view_report-function branch 7 times, most recently from 582acbe to 42a7c68 Compare July 18, 2022 18:41
@noahshaw11 noahshaw11 force-pushed the implement-view_report-function branch 2 times, most recently from 97e4374 to fb33a19 Compare July 18, 2022 21:41
@noahshaw11 noahshaw11 changed the title Implement view_report function Implement index report functions Jul 18, 2022
@noahshaw11 noahshaw11 force-pushed the implement-view_report-function branch 8 times, most recently from a2388f7 to 34fb570 Compare July 20, 2022 05:03
Copy link
Contributor

@iilyak iilyak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, Good work.

@noahshaw11
Copy link
Contributor Author

+1, Good work.

Thanks, @iilyak!

@noahshaw11 noahshaw11 force-pushed the implement-view_report-function branch from 34fb570 to 9dc12ac Compare July 21, 2022 17:10
@noahshaw11 noahshaw11 force-pushed the implement-view_report-function branch from 9dc12ac to 963daf6 Compare July 22, 2022 20:05
@iilyak iilyak merged commit a45e82a into apache:main Jul 25, 2022
@noahshaw11 noahshaw11 deleted the implement-view_report-function branch July 25, 2022 19:36
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.

None yet

2 participants