Thank you, just a few slight comments from my side. LGTM otherwise. https://codereview.appspot.com/308860044/diff/1/resources/com/google/enterprise/adaptor/resources/dashboard.js File resources/com/google/enterprise/adaptor/resources/dashboard.js ...
7 years, 8 months ago
(2016-08-04 01:07:29 UTC)
#3
Tried to explain "Boolean" in the dashboard.js; made all changes suggested by Szabi. https://codereview.appspot.com/308860044/diff/1/resources/com/google/enterprise/adaptor/resources/dashboard.js File ...
7 years, 8 months ago
(2016-08-04 18:02:51 UTC)
#4
Answered questions / made all requested changes. https://codereview.appspot.com/308860044/diff/20001/resources/com/google/enterprise/adaptor/resources/dashboard.js File resources/com/google/enterprise/adaptor/resources/dashboard.js (right): https://codereview.appspot.com/308860044/diff/20001/resources/com/google/enterprise/adaptor/resources/dashboard.js#newcode174 resources/com/google/enterprise/adaptor/resources/dashboard.js:174: data.simpleStats.lastSuccessfulGroupPushStart); On ...
7 years, 8 months ago
(2016-08-04 22:45:38 UTC)
#7
Answered questions / made all requested changes.
https://codereview.appspot.com/308860044/diff/20001/resources/com/google/ente...
File resources/com/google/enterprise/adaptor/resources/dashboard.js (right):
https://codereview.appspot.com/308860044/diff/20001/resources/com/google/ente...
resources/com/google/enterprise/adaptor/resources/dashboard.js:174:
data.simpleStats.lastSuccessfulGroupPushStart);
On 2016/08/04 20:45:50, pjo wrote:
> Does successfulGroupPushStart imply an entire push succeeded? or does it
imply
> only that a group push started?
>
> It seems like using lastSucessfulGroupPushEnd would remove ambiguity.
Done - made it lastSucessfulGroupPushEnd (but it really did mean an entire push
succeeded before the change).
https://codereview.appspot.com/308860044/diff/20001/src/com/google/enterprise...
File src/com/google/enterprise/adaptor/DocIdSender.java (right):
https://codereview.appspot.com/308860044/diff/20001/src/com/google/enterprise...
src/com/google/enterprise/adaptor/DocIdSender.java:263:
journal.recordGroupPushSuccessful();
On 2016/08/04 20:45:50, pjo wrote:
> is it really tho? given that nothing was sent? can you provide argument why
this
> is a good idea? (rather than skipping all calls to jounral)
When we call journal.recordGroupPushStarted(), we need to follow it with either
PushFailed(), PushInterrupted(), or PushSuccessful() before starting the
subsequent push. Of these, Successful() seemed the best fit. But after your
question, I think it's better to move the "journal.recordGroupPushStarted()" to
after this "if" -- that is, if we are asked to push an empty collection of
groups, we won't journal anything (just log) - we'll only record that a group
push started if there's at least one group to push.
https://codereview.appspot.com/308860044/diff/20001/src/com/google/enterprise...
src/com/google/enterprise/adaptor/DocIdSender.java:300: numGroups +=
batch.size();
On 2016/08/04 20:45:50, pjo wrote:
> IF we have a failedId then we didn't push batch.size() of them right?
OK - changed code to increment only if the batch was successful (with a TODO to
see if it makes sense to count a partial batch).
https://codereview.appspot.com/308860044/diff/20001/src/com/google/enterprise...
File src/com/google/enterprise/adaptor/Journal.java (right):
https://codereview.appspot.com/308860044/diff/20001/src/com/google/enterprise...
src/com/google/enterprise/adaptor/Journal.java:36: private long
totalGroupPushes;
On 2016/08/04 20:45:50, pjo wrote:
> Annotate:
> Equals to the sum of values in timesGroupPushed.
>
Done.
https://codereview.appspot.com/308860044/diff/20001/src/com/google/enterprise...
src/com/google/enterprise/adaptor/Journal.java:38: private Map<GroupPrincipal,
Integer> groupMembersPushed;
On 2016/08/04 20:45:50, pjo wrote:
> How about: totalGroupMembersPushed?
>
> or at least annotate:
> Accumulates total number of members pushed throughout all pushes of group.
Done (the annotation).
https://codereview.appspot.com/308860044/diff/20001/src/com/google/enterprise...
src/com/google/enterprise/adaptor/Journal.java:39: private long
totalGroupMemberPushes;
On 2016/08/04 20:45:50, pjo wrote:
> Annotate:
> Equals to the sum of values in groupMembersPushed.
Done.
https://codereview.appspot.com/308860044/diff/20001/src/com/google/enterprise...
src/com/google/enterprise/adaptor/Journal.java:215:
increment(timesNonGsaRequested, requested);
On 2016/08/04 20:45:50, pjo wrote:
> leave existing code alone, pls
I had made a change (which I later backed out) - I had not remembered to restore
the trailing blank, though. It's back again (unchanged).
https://codereview.appspot.com/308860044/diff/20001/src/com/google/enterprise...
src/com/google/enterprise/adaptor/Journal.java:307: private static void
groupIncrement(Map<GroupPrincipal, Integer> counts,
On 2016/08/04 20:45:50, pjo wrote:
> put method next to its use recordGroupPush
Done.
https://codereview.appspot.com/308860044/diff/20001/src/com/google/enterprise...
src/com/google/enterprise/adaptor/Journal.java:498: JournalSnapshot(Journal
journal, long currentTime, Stats[] timeStatsClone) {
On 2016/08/04 20:45:50, pjo wrote:
> Should we be synchronized on jounral instance in this ctor?
Makes sense to me. Done.
https://codereview.appspot.com/308860044/diff/40001/src/com/google/enterprise/adaptor/Journal.java File src/com/google/enterprise/adaptor/Journal.java (right): https://codereview.appspot.com/308860044/diff/40001/src/com/google/enterprise/adaptor/Journal.java#newcode500 src/com/google/enterprise/adaptor/Journal.java:500: synchronized (journal) { Maybe it would be more elegant ...
7 years, 8 months ago
(2016-08-05 00:07:55 UTC)
#8
PTAL (both of you). Reverting the change to add "synchronized" around the JournalSnapshot constructor (with ...
7 years, 8 months ago
(2016-08-05 17:29:13 UTC)
#9
PTAL (both of you). Reverting the change to add "synchronized" around the
JournalSnapshot constructor (with explanation below).
https://codereview.appspot.com/308860044/diff/40001/src/com/google/enterprise...
File src/com/google/enterprise/adaptor/Journal.java (right):
https://codereview.appspot.com/308860044/diff/40001/src/com/google/enterprise...
src/com/google/enterprise/adaptor/Journal.java:500: synchronized (journal) {
On 2016/08/05 00:07:55, sfruhwald wrote:
> Maybe it would be more elegant to just make this constructor private and
having
> a synchronized createSnapshot method on Journal that returns with a Snapshot
> instance?
I took a closer look after your comment, and it turns out that the constructor
is only called from two places: from Journal.getSnapshot() -- which is already
synchronized, so the most recent change of wrapping the whole method with
"synchronized" doesn't achieve anything -- and from StatRpcMethodTest.java
(where it's called from SnapshotMockJournal -- and there's only a single
instance of that class used in the tests, so that use doesn't need the
"synchronized" either). I'm reverting the "synchronized (journal) { ... }"
wrapper, and adding @VisibleForTesting (as I would have made it private were it
not used in StatRpcMethodTest.class.
Voila - the constructor is once again "elegant."
On 2016/08/05 17:29:13, myk wrote: > PTAL (both of you). Reverting the change to add ...
7 years, 8 months ago
(2016-08-05 17:51:11 UTC)
#10
On 2016/08/05 17:29:13, myk wrote:
> PTAL (both of you). Reverting the change to add "synchronized" around the
> JournalSnapshot constructor (with explanation below).
>
>
https://codereview.appspot.com/308860044/diff/40001/src/com/google/enterprise...
> File src/com/google/enterprise/adaptor/Journal.java (right):
>
>
https://codereview.appspot.com/308860044/diff/40001/src/com/google/enterprise...
> src/com/google/enterprise/adaptor/Journal.java:500: synchronized (journal) {
> On 2016/08/05 00:07:55, sfruhwald wrote:
> > Maybe it would be more elegant to just make this constructor private and
> having
> > a synchronized createSnapshot method on Journal that returns with a Snapshot
> > instance?
>
> I took a closer look after your comment, and it turns out that the constructor
> is only called from two places: from Journal.getSnapshot() -- which is already
> synchronized, so the most recent change of wrapping the whole method with
> "synchronized" doesn't achieve anything -- and from StatRpcMethodTest.java
> (where it's called from SnapshotMockJournal -- and there's only a single
> instance of that class used in the tests, so that use doesn't need the
> "synchronized" either). I'm reverting the "synchronized (journal) { ... }"
> wrapper, and adding @VisibleForTesting (as I would have made it private were
it
> not used in StatRpcMethodTest.class.
>
> Voila - the constructor is once again "elegant."
That's perfect, thank you! LGTM again.
LGTM - - technology's compounding interest On Fri, Aug 5, 2016 at 10:51 AM, <sfruhwald@google.com> ...
7 years, 8 months ago
(2016-08-08 23:45:14 UTC)
#11
LGTM
-
- technology's compounding interest
On Fri, Aug 5, 2016 at 10:51 AM, <sfruhwald@google.com> wrote:
> On 2016/08/05 17:29:13, myk wrote:
>
>> PTAL (both of you). Reverting the change to add "synchronized" around
>>
> the
>
>> JournalSnapshot constructor (with explanation below).
>>
>
>
> https://codereview.appspot.com/308860044/diff/40001/src/com/
> google/enterprise/adaptor/Journal.java
>
>> File src/com/google/enterprise/adaptor/Journal.java (right):
>>
>
>
> https://codereview.appspot.com/308860044/diff/40001/src/com/
> google/enterprise/adaptor/Journal.java#newcode500
>
>> src/com/google/enterprise/adaptor/Journal.java:500: synchronized
>>
> (journal) {
>
>> On 2016/08/05 00:07:55, sfruhwald wrote:
>> > Maybe it would be more elegant to just make this constructor private
>>
> and
>
>> having
>> > a synchronized createSnapshot method on Journal that returns with a
>>
> Snapshot
>
>> > instance?
>>
>
> I took a closer look after your comment, and it turns out that the
>>
> constructor
>
>> is only called from two places: from Journal.getSnapshot() -- which is
>>
> already
>
>> synchronized, so the most recent change of wrapping the whole method
>>
> with
>
>> "synchronized" doesn't achieve anything -- and from
>>
> StatRpcMethodTest.java
>
>> (where it's called from SnapshotMockJournal -- and there's only a
>>
> single
>
>> instance of that class used in the tests, so that use doesn't need the
>> "synchronized" either). I'm reverting the "synchronized (journal) {
>>
> ... }"
>
>> wrapper, and adding @VisibleForTesting (as I would have made it
>>
> private were it
>
>> not used in StatRpcMethodTest.class.
>>
>
> Voila - the constructor is once again "elegant."
>>
>
> That's perfect, thank you! LGTM again.
>
> https://codereview.appspot.com/308860044/
>
Issue 308860044: Add group push info (text only) to logs and dashboard
(Closed)
Created 7 years, 9 months ago by myk
Modified 7 years, 8 months ago
Reviewers: pjo, sfruhwald
Base URL:
Comments: 32