You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Adar Dembo (Code Review)" <ge...@cloudera.org> on 2019/12/21 00:26:33 UTC

[kudu-CR] protoc-gen-krpc: remove kudu util dependency and clean up

Hello Alexey Serbin, Andrew Wong, Volodymyr Verovkin, Todd Lipcon,

I'd like you to do a code review. Please visit

    http://gerrit.cloudera.org:8080/14942

to review the following change.


Change subject: protoc-gen-krpc: remove kudu_util dependency and clean up
......................................................................

protoc-gen-krpc: remove kudu_util dependency and clean up

We've had a longstanding issue in incremental builds where a change to
versions_defines.h would trigger a rebuild of what seemed like the entire
codebase. I've looked into it at various times, enough to enumerate the set
of events that change version_defines.h:
- Rebasing on top of another commit.
- Committing a new commit.
- Taking the working tree from "dirty" to "clean" or vice versa (e.g. saving
  one edit, or running "git checkout --").

I thought I could mitigate that by removing the "clean repo" aspect of
version_defines.h, but my workflow involves the creation of many commits
with the occasional rebase to squash them, so I wouldn't benefit much.

I took a deeper look today and learned something new: protoc-gen-krpc's
dependency on kudu_util establishes a dependency chain that looks like this:

  version_defines.h
  -> kudu_util
  -> protoc-gen-krpc
  -> <every krpc-related .pb.cc and .pb.h file>
  -> <a lot of other Kudu files>

This explains why whenever version_defines.h is regenerated, we end up
rebuilding so much of Kudu.

So I looked into severing that dependency, and it turns out to be quite
simple. We use kudu_util in protoc-gen-krpc for two things: Status, and
string casing. Both are used just once with reasonable alternatives.

After removing the kudu_util -> protoc-gen-krpc dependency, a "clean" to
"dirty" working tree transition led to a 377-step ninja build with only four
compilation steps (for version_info.cc twice, master-test.cc, and
precompiled.ll.cc). Before this change, it was a 634-step ninja build with
248 compilation steps.

Along the way I did some clean up and modernized a few things.

Change-Id: Ifcde701648ca87c64dd3a09468df97654d58317a
---
M src/kudu/rpc/CMakeLists.txt
M src/kudu/rpc/protoc-gen-krpc.cc
2 files changed, 108 insertions(+), 137 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/42/14942/1
-- 
To view, visit http://gerrit.cloudera.org:8080/14942
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifcde701648ca87c64dd3a09468df97654d58317a
Gerrit-Change-Number: 14942
Gerrit-PatchSet: 1
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>

[kudu-CR] protoc-gen-krpc: remove kudu util dependency and clean up

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/14942 )

Change subject: protoc-gen-krpc: remove kudu_util dependency and clean up
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14942/4/src/kudu/rpc/protoc-gen-krpc.cc
File src/kudu/rpc/protoc-gen-krpc.cc:

http://gerrit.cloudera.org:8080/#/c/14942/4/src/kudu/rpc/protoc-gen-krpc.cc@a107
PS4, Line 107: 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
Is not no longer necessary?



-- 
To view, visit http://gerrit.cloudera.org:8080/14942
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifcde701648ca87c64dd3a09468df97654d58317a
Gerrit-Change-Number: 14942
Gerrit-PatchSet: 2
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Comment-Date: Sat, 21 Dec 2019 00:59:13 +0000
Gerrit-HasComments: Yes

[kudu-CR] protoc-gen-krpc: remove kudu util dependency and clean up

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/14942 )

Change subject: protoc-gen-krpc: remove kudu_util dependency and clean up
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14942/4/src/kudu/rpc/protoc-gen-krpc.cc
File src/kudu/rpc/protoc-gen-krpc.cc:

http://gerrit.cloudera.org:8080/#/c/14942/4/src/kudu/rpc/protoc-gen-krpc.cc@a107
PS4, Line 107: 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
> Is not no longer necessary?
Nope. upper_case (and thus base) were used in the emitted headers, but I replaced that usage with #pragma once.



-- 
To view, visit http://gerrit.cloudera.org:8080/14942
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifcde701648ca87c64dd3a09468df97654d58317a
Gerrit-Change-Number: 14942
Gerrit-PatchSet: 4
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Comment-Date: Tue, 24 Dec 2019 04:46:36 +0000
Gerrit-HasComments: Yes

[kudu-CR] protoc-gen-krpc: remove kudu util dependency and clean up

Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/14942 )

Change subject: protoc-gen-krpc: remove kudu_util dependency and clean up
......................................................................


Patch Set 5: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14942/4/src/kudu/rpc/protoc-gen-krpc.cc
File src/kudu/rpc/protoc-gen-krpc.cc:

http://gerrit.cloudera.org:8080/#/c/14942/4/src/kudu/rpc/protoc-gen-krpc.cc@a107
PS4, Line 107: 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
             : 
> Nope. upper_case (and thus base) were used in the emitted headers, but I re
Ah, I see.



-- 
To view, visit http://gerrit.cloudera.org:8080/14942
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifcde701648ca87c64dd3a09468df97654d58317a
Gerrit-Change-Number: 14942
Gerrit-PatchSet: 5
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Comment-Date: Tue, 24 Dec 2019 05:40:15 +0000
Gerrit-HasComments: Yes

[kudu-CR] protoc-gen-krpc: remove kudu util dependency and clean up

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Andrew Wong, Volodymyr Verovkin, Todd Lipcon, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/14942

to look at the new patch set (#4).

Change subject: protoc-gen-krpc: remove kudu_util dependency and clean up
......................................................................

protoc-gen-krpc: remove kudu_util dependency and clean up

We've had a longstanding issue in incremental builds where a change to
versions_defines.h would trigger a rebuild of what seemed like the entire
codebase. I've looked into it at various times, enough to enumerate the set
of events that change version_defines.h:
- Rebasing on top of another commit.
- Committing a new commit.
- Taking the working tree from "dirty" to "clean" or vice versa (e.g. saving
  one edit, or running "git checkout --").

I thought I could mitigate that by removing the "clean repo" aspect of
version_defines.h, but my workflow involves the creation of many commits
with the occasional rebase to squash them, so I wouldn't benefit much.

I took a deeper look today and learned something new: protoc-gen-krpc's
dependency on kudu_util establishes a dependency chain that looks like this:

  version_defines.h
  -> kudu_util
  -> protoc-gen-krpc
  -> <every krpc-related .pb.cc and .pb.h file>
  -> <a lot of other Kudu files>

This explains why whenever version_defines.h is regenerated, we end up
rebuilding so much of Kudu.

So I looked into severing that dependency, and it turns out to be quite
simple. We use kudu_util in protoc-gen-krpc for two things: Status, and
string casing. Both are used just once with reasonable alternatives.

After removing the kudu_util -> protoc-gen-krpc dependency, a "clean" to
"dirty" working tree transition led to a 377-step ninja build with only four
compilation steps (for version_info.cc twice, master-test.cc, and
precompiled.ll.cc). Before this change, it was a 634-step ninja build with
248 compilation steps.

Along the way I did some clean up and modernized a few things.

Change-Id: Ifcde701648ca87c64dd3a09468df97654d58317a
---
M src/kudu/rpc/CMakeLists.txt
M src/kudu/rpc/protoc-gen-krpc.cc
2 files changed, 110 insertions(+), 140 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/42/14942/4
-- 
To view, visit http://gerrit.cloudera.org:8080/14942
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifcde701648ca87c64dd3a09468df97654d58317a
Gerrit-Change-Number: 14942
Gerrit-PatchSet: 4
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>

[kudu-CR] protoc-gen-krpc: remove kudu util dependency and clean up

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Andrew Wong, Volodymyr Verovkin, Todd Lipcon, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/14942

to look at the new patch set (#5).

Change subject: protoc-gen-krpc: remove kudu_util dependency and clean up
......................................................................

protoc-gen-krpc: remove kudu_util dependency and clean up

We've had a longstanding issue in incremental builds where a change to
versions_defines.h would trigger a rebuild of what seemed like the entire
codebase. I've looked into it at various times, enough to enumerate the set
of events that change version_defines.h:
- Rebasing on top of another commit.
- Committing a new commit.
- Taking the working tree from "dirty" to "clean" or vice versa (e.g. saving
  one edit, or running "git checkout --").

I thought I could mitigate that by removing the "clean repo" aspect of
version_defines.h, but my workflow involves the creation of many commits
with the occasional rebase to squash them, so I wouldn't benefit much.

I took a deeper look today and learned something new: protoc-gen-krpc's
dependency on kudu_util establishes a dependency chain that looks like this:

  version_defines.h
  -> kudu_util
  -> protoc-gen-krpc
  -> <every krpc-related .pb.cc and .pb.h file>
  -> <a lot of other Kudu files>

This explains why whenever version_defines.h is regenerated, we end up
rebuilding so much of Kudu.

So I looked into severing that dependency, and it turns out to be quite
simple. We use kudu_util in protoc-gen-krpc for two things: Status, and
string casing. Both are used just once with reasonable alternatives.

After removing the kudu_util -> protoc-gen-krpc dependency, a "clean" to
"dirty" working tree transition led to a 377-step ninja build with only four
compilation steps (for version_info.cc twice, master-test.cc, and
precompiled.ll.cc). Before this change, it was a 634-step ninja build with
248 compilation steps.

Along the way I did some clean up and modernized a few things.

Change-Id: Ifcde701648ca87c64dd3a09468df97654d58317a
---
M src/kudu/rpc/CMakeLists.txt
M src/kudu/rpc/protoc-gen-krpc.cc
2 files changed, 110 insertions(+), 141 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/42/14942/5
-- 
To view, visit http://gerrit.cloudera.org:8080/14942
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifcde701648ca87c64dd3a09468df97654d58317a
Gerrit-Change-Number: 14942
Gerrit-PatchSet: 5
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>

[kudu-CR] protoc-gen-krpc: remove kudu util dependency and clean up

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Hello Alexey Serbin, Kudu Jenkins, Andrew Wong, Volodymyr Verovkin, Todd Lipcon, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/14942

to look at the new patch set (#2).

Change subject: protoc-gen-krpc: remove kudu_util dependency and clean up
......................................................................

protoc-gen-krpc: remove kudu_util dependency and clean up

We've had a longstanding issue in incremental builds where a change to
versions_defines.h would trigger a rebuild of what seemed like the entire
codebase. I've looked into it at various times, enough to enumerate the set
of events that change version_defines.h:
- Rebasing on top of another commit.
- Committing a new commit.
- Taking the working tree from "dirty" to "clean" or vice versa (e.g. saving
  one edit, or running "git checkout --").

I thought I could mitigate that by removing the "clean repo" aspect of
version_defines.h, but my workflow involves the creation of many commits
with the occasional rebase to squash them, so I wouldn't benefit much.

I took a deeper look today and learned something new: protoc-gen-krpc's
dependency on kudu_util establishes a dependency chain that looks like this:

  version_defines.h
  -> kudu_util
  -> protoc-gen-krpc
  -> <every krpc-related .pb.cc and .pb.h file>
  -> <a lot of other Kudu files>

This explains why whenever version_defines.h is regenerated, we end up
rebuilding so much of Kudu.

So I looked into severing that dependency, and it turns out to be quite
simple. We use kudu_util in protoc-gen-krpc for two things: Status, and
string casing. Both are used just once with reasonable alternatives.

After removing the kudu_util -> protoc-gen-krpc dependency, a "clean" to
"dirty" working tree transition led to a 377-step ninja build with only four
compilation steps (for version_info.cc twice, master-test.cc, and
precompiled.ll.cc). Before this change, it was a 634-step ninja build with
248 compilation steps.

Along the way I did some clean up and modernized a few things.

Change-Id: Ifcde701648ca87c64dd3a09468df97654d58317a
---
M src/kudu/rpc/CMakeLists.txt
M src/kudu/rpc/protoc-gen-krpc.cc
2 files changed, 109 insertions(+), 138 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/42/14942/2
-- 
To view, visit http://gerrit.cloudera.org:8080/14942
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifcde701648ca87c64dd3a09468df97654d58317a
Gerrit-Change-Number: 14942
Gerrit-PatchSet: 2
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>

[kudu-CR] protoc-gen-krpc: remove kudu util dependency and clean up

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/14942 )

Change subject: protoc-gen-krpc: remove kudu_util dependency and clean up
......................................................................


Patch Set 5: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/14942
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifcde701648ca87c64dd3a09468df97654d58317a
Gerrit-Change-Number: 14942
Gerrit-PatchSet: 5
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Comment-Date: Tue, 07 Jan 2020 04:31:38 +0000
Gerrit-HasComments: No

[kudu-CR] protoc-gen-krpc: remove kudu util dependency and clean up

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/14942 )

Change subject: protoc-gen-krpc: remove kudu_util dependency and clean up
......................................................................

protoc-gen-krpc: remove kudu_util dependency and clean up

We've had a longstanding issue in incremental builds where a change to
versions_defines.h would trigger a rebuild of what seemed like the entire
codebase. I've looked into it at various times, enough to enumerate the set
of events that change version_defines.h:
- Rebasing on top of another commit.
- Committing a new commit.
- Taking the working tree from "dirty" to "clean" or vice versa (e.g. saving
  one edit, or running "git checkout --").

I thought I could mitigate that by removing the "clean repo" aspect of
version_defines.h, but my workflow involves the creation of many commits
with the occasional rebase to squash them, so I wouldn't benefit much.

I took a deeper look today and learned something new: protoc-gen-krpc's
dependency on kudu_util establishes a dependency chain that looks like this:

  version_defines.h
  -> kudu_util
  -> protoc-gen-krpc
  -> <every krpc-related .pb.cc and .pb.h file>
  -> <a lot of other Kudu files>

This explains why whenever version_defines.h is regenerated, we end up
rebuilding so much of Kudu.

So I looked into severing that dependency, and it turns out to be quite
simple. We use kudu_util in protoc-gen-krpc for two things: Status, and
string casing. Both are used just once with reasonable alternatives.

After removing the kudu_util -> protoc-gen-krpc dependency, a "clean" to
"dirty" working tree transition led to a 377-step ninja build with only four
compilation steps (for version_info.cc twice, master-test.cc, and
precompiled.ll.cc). Before this change, it was a 634-step ninja build with
248 compilation steps.

Along the way I did some clean up and modernized a few things.

Change-Id: Ifcde701648ca87c64dd3a09468df97654d58317a
Reviewed-on: http://gerrit.cloudera.org:8080/14942
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <as...@cloudera.com>
Reviewed-by: Andrew Wong <aw...@cloudera.com>
---
M src/kudu/rpc/CMakeLists.txt
M src/kudu/rpc/protoc-gen-krpc.cc
2 files changed, 110 insertions(+), 141 deletions(-)

Approvals:
  Kudu Jenkins: Verified
  Alexey Serbin: Looks good to me, approved
  Andrew Wong: Looks good to me, approved

-- 
To view, visit http://gerrit.cloudera.org:8080/14942
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifcde701648ca87c64dd3a09468df97654d58317a
Gerrit-Change-Number: 14942
Gerrit-PatchSet: 6
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>

[kudu-CR] protoc-gen-krpc: remove kudu util dependency and clean up

Posted by "Andrew Wong (Code Review)" <ge...@cloudera.org>.
Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/14942 )

Change subject: protoc-gen-krpc: remove kudu_util dependency and clean up
......................................................................


Patch Set 3: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14942/2/src/kudu/rpc/protoc-gen-krpc.cc
File src/kudu/rpc/protoc-gen-krpc.cc:

http://gerrit.cloudera.org:8080/#/c/14942/2/src/kudu/rpc/protoc-gen-krpc.cc@96
PS2, Line 96:     map_["path"] = path;
nit: maybe move this down after the condition?



-- 
To view, visit http://gerrit.cloudera.org:8080/14942
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifcde701648ca87c64dd3a09468df97654d58317a
Gerrit-Change-Number: 14942
Gerrit-PatchSet: 3
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Comment-Date: Sat, 21 Dec 2019 00:37:56 +0000
Gerrit-HasComments: Yes

[kudu-CR] protoc-gen-krpc: remove kudu util dependency and clean up

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/14942 )

Change subject: protoc-gen-krpc: remove kudu_util dependency and clean up
......................................................................


Patch Set 4:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14942/2/src/kudu/rpc/protoc-gen-krpc.cc
File src/kudu/rpc/protoc-gen-krpc.cc:

http://gerrit.cloudera.org:8080/#/c/14942/2/src/kudu/rpc/protoc-gen-krpc.cc@96
PS2, Line 96:     const string& path = file->name();
> nit: maybe move this down after the condition?
Done



-- 
To view, visit http://gerrit.cloudera.org:8080/14942
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifcde701648ca87c64dd3a09468df97654d58317a
Gerrit-Change-Number: 14942
Gerrit-PatchSet: 4
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Comment-Date: Sat, 21 Dec 2019 00:40:01 +0000
Gerrit-HasComments: Yes

[kudu-CR] protoc-gen-krpc: remove kudu util dependency and clean up

Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Hello Tidy Bot, Alexey Serbin, Kudu Jenkins, Andrew Wong, Volodymyr Verovkin, Todd Lipcon, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/14942

to look at the new patch set (#3).

Change subject: protoc-gen-krpc: remove kudu_util dependency and clean up
......................................................................

protoc-gen-krpc: remove kudu_util dependency and clean up

We've had a longstanding issue in incremental builds where a change to
versions_defines.h would trigger a rebuild of what seemed like the entire
codebase. I've looked into it at various times, enough to enumerate the set
of events that change version_defines.h:
- Rebasing on top of another commit.
- Committing a new commit.
- Taking the working tree from "dirty" to "clean" or vice versa (e.g. saving
  one edit, or running "git checkout --").

I thought I could mitigate that by removing the "clean repo" aspect of
version_defines.h, but my workflow involves the creation of many commits
with the occasional rebase to squash them, so I wouldn't benefit much.

I took a deeper look today and learned something new: protoc-gen-krpc's
dependency on kudu_util establishes a dependency chain that looks like this:

  version_defines.h
  -> kudu_util
  -> protoc-gen-krpc
  -> <every krpc-related .pb.cc and .pb.h file>
  -> <a lot of other Kudu files>

This explains why whenever version_defines.h is regenerated, we end up
rebuilding so much of Kudu.

So I looked into severing that dependency, and it turns out to be quite
simple. We use kudu_util in protoc-gen-krpc for two things: Status, and
string casing. Both are used just once with reasonable alternatives.

After removing the kudu_util -> protoc-gen-krpc dependency, a "clean" to
"dirty" working tree transition led to a 377-step ninja build with only four
compilation steps (for version_info.cc twice, master-test.cc, and
precompiled.ll.cc). Before this change, it was a 634-step ninja build with
248 compilation steps.

Along the way I did some clean up and modernized a few things.

Change-Id: Ifcde701648ca87c64dd3a09468df97654d58317a
---
M src/kudu/rpc/CMakeLists.txt
M src/kudu/rpc/protoc-gen-krpc.cc
2 files changed, 109 insertions(+), 138 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/42/14942/3
-- 
To view, visit http://gerrit.cloudera.org:8080/14942
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifcde701648ca87c64dd3a09468df97654d58317a
Gerrit-Change-Number: 14942
Gerrit-PatchSet: 3
Gerrit-Owner: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>