Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] StaleObjectStateException thrown by loader jobs after patch

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] StaleObjectStateException thrown by loader jobs after patch


Chronological Thread 
  • From: "Hyzer, Chris" <>
  • To: Scott Koranda <>
  • Cc: grouper-users <>
  • Subject: RE: [grouper-users] StaleObjectStateException thrown by loader jobs after patch
  • Date: Fri, 16 Feb 2018 16:41:59 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) ;
  • Ironport-phdr: 9a23:i7L3ohU/js6TS27o7B/UGKar7DbV8LGtZVwlr6E/grcLSJyIuqrYbRGBt8tkgFKBZ4jH8fUM07OQ7/i7HzRYqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba98IRmssQndqtQdjJd/JKo21hbHuGZDdf5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2UbJXDDI9M2Ao/8LrrgXMTRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6tvZ41SKHM8D6Uaw4VDK/5KpwVhTmlDkIOCI48GHPi8x/kqRboA66pxdix4LYeZyZOOZicq/Ye94RWGhPUdtLVyFZAo2ycZYBD/YPM+hboYnypVoOogexCwajH+7v1iZIimPq0aEmz+gtDwfL1xEgEdIUt3TUqc34OKkQX+G1zajH0y/DY+tL0jrj6IjIaBEhoeqCUbltdsfRzFUgFwPFj1SRt4PlJSiY1uUWs2eH9eZgSPqvhHAhqwF3uDSg2NojipTQi48T11vK9j15zZ4rKdKiVEJ3fNupHIZNuy2HMoZ2TMwvT310tCs/yLAJp5G2cDUPxZki2RLTd/+Kf5CV7h/tSOqdOzN1iG9/dL6hmhq/9VKsxvD+W8S1yFpKoDRKn9rQun0I0hHc9NWIRedz/kqk1zaC2QTe5+BBLE8uiaXWL4Atz7s+lpcTtUnOESn7k1jsgqCMbEUr4O2o5vznYrr4op+cMJd5hBniP6ophsCzHP00PxUWUWWV4Oi806bs8lPjTLVNk/02jrLWsJfHJcQdu6G1GRdV0pwk6xajETipzMgYnXgALFJDYh6HiJXpO03KIPD/Cve/gE6gnytsx/DDJrHhA5PNIWbfkLr5Y7py8VJQxBc2wNxC+p5YF7QMIPz8V0PtqNDVCx00PBK7zur6Ddhw050SVX6MD6OBNaPdq16I5uYhI+mWY48VvS7wK/056P7ujX44mEESfbOy0JsWc3C3Au5qI1iBYXXyhNcBF30GsRQjQ+z3kFGCSyJcZ26uX6Ig4TE2EI2mDZ3ERoCwmLyOwj27EoRLZmBdFF+MC2zoep6AW/cNcyKSPtRhniIeWbigTY8hyQ+htBX8y7V5MurY5DcUuoz+29hotKXvkkQJ/jtoE4y+1HuESW191jcTRDgs1aZzqGRyz16C1e5zhPkORvJJ4PYcGCcrJ5PGi6RRC8rzQUiJKtKCSEe0T8+OACo6CM8pztkIJUtxBoPx3Vj4wyO2DupNxPSwD5su//eZhiCpKg==
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

How many groups are loaded? Millions?

> If I do not delete the loader jobs then when the loader runs it will run
> the loader jobs. The loader jobs may create "real" changes that end up
> in GROUPER_CHANGE_LOG_TEMP. I want to be able to really TRUNCATE
> GROUPER_CHANGE_LOG_TEMP since that is a fast operation, rather than
> trying to delete by row. So I do not want any "real" changes in the
> GROUPER_CHANGE_LOG_TEMP.

Gotcha. Didn't realize they run every minute.

> Maybe I am not, however, understanding how those 27 million rows in
> GROUPER_CHANGE_LOG_TEMP come about. Are they only created when the
> "real" loader jobs run?

Hmmmm. I deleted two of the new attributes, and change the incorrect value
in a list of groups with two groups. I ran the loader. I got two change log
entries per loaded group. One for
etc:attribute:loaderMetadata:grouperLoaderMetadataLastSummary and one for
etc:attribute:loaderMetadata:grouperLoaderMetadataLastFullMillisSince1970
I believe you already have assignments on loaded groups for
grouperLoaderMetadataLoaded and grouperLoaderMetadataGroupId.

Not saying this is better, but before the patch, you could create those
attributes, and run a GSH script to assign them to loaded groups, maybe a
sleeping a second after a dozen assignments. Up to you.

> > Run the PIT sync in GSH: new
> > edu.internet2.middleware.grouper.misc.SyncPITTables().syncAllPITTables()
>
> Why is that necessary?

Gets the PIT data up to date and non corrupt. If you need more info ask
Shilen (and maybe we can update the PIT wiki, im looking and not seeing an
explanation).

Thanks
Chris


-----Original Message-----
From: Scott Koranda
[mailto:]

Sent: Thursday, February 15, 2018 4:26 PM
To: Hyzer, Chris
<>
Cc: grouper-users
<>
Subject: Re: [grouper-users] StaleObjectStateException thrown by loader jobs
after patch

> Ok, the restriction in the change log is for the value assignments,
> not the attribute assignments. So these are a one time thing.

It makes sense it is one time, but it has a significant impact on how
long the outage has to be for Grouper to incorporate these patches.

> > Since all of those rows have to be processed and moved from
> > GROUPER_CHANGE_LOG_ENTRY_TEMP to GROUPER_CHANGE_LOG, and then the
> > various change log consumers have to process each of those rows, any
> > "real" changes in group memberships are not going to be processed
> > for quite some time.
>
> Do you know how long it would take?

After patching to 95 and starting the loader there were 27 million rows
added to GROUPER_CHANGE_LOG_ENTRY_TEMP.

I estimate it will take this deployment about 8 hours to grind through
that.

> Is it just the change log temp to
> change log or is it individual processors? Maybe we need to switch to
> a batched SQL paradigm for the change log temp to change log
> processing...

The 8 hours is primarily the change log temp to the change log. The
change log consumers fire on the changes once they get to the change log
but they just ignore these changes.

> About your recipe
>
> - make sure all "real" work is processed - stop the loader
>
> right
>
> - delete loader jobs
>
> I don't know why you need to delete the jobs

If I do not delete the loader jobs then when the loader runs it will run
the loader jobs. The loader jobs may create "real" changes that end up
in GROUPER_CHANGE_LOG_TEMP. I want to be able to really TRUNCATE
GROUPER_CHANGE_LOG_TEMP since that is a fast operation, rather than
trying to delete by row. So I do not want any "real" changes in the
GROUPER_CHANGE_LOG_TEMP.

Maybe I am not, however, understanding how those 27 million rows in
GROUPER_CHANGE_LOG_TEMP come about. Are they only created when the
"real" loader jobs run?

If so, then I may not be able to just TRUNCATE, and will instead have to
delete by row. But that could also take real time.

This deployment has loader jobs that run every minute. Changes in group
memberships are expected to show up in the downstream provisioned
services within 5 minutes or so.

I am trying to find a way to patch but not have an 8 hour outage.

> - patch - start the loader
>
> run all the loader jobs
>
>
> - wait for the change log temp to stop growing
>
> wait for jobs to finish?
>
> - stop the loader - truncate GROUPER_CHANGE_LOG_ENTRY_TEMP - truncate
> GROUPER_CHANGE_LOG_ENTRY
>
> Run the PIT sync in GSH: new
> edu.internet2.middleware.grouper.misc.SyncPITTables().syncAllPITTables()

Why is that necessary?

Thanks,

Scott K

> - re-create the loader jobs
>
> If you aren't deleting them you don't need to recreate them
>
> - start the loader
>
>
> -----Original Message----- From: Scott Koranda
> [mailto:]
> Sent: Thursday, February 15, 2018 12:16 PM
> To: Hyzer, Chris
> <>
> Cc: grouper-users
> <>
> Subject: Re: [grouper-users]
> StaleObjectStateException thrown by loader jobs after patch
>
> > There are no new rows for this patch, but there were a few attribute
> > assignments added to loaded groups from a previous patch. There are
> > no audits or point in time associated with the attributes which
> > change each time the loader runs for the job in this patch. We have
> > worked hard to make sure this is as lightweight as possible and
> > Grouper assumes they are there. Added some metadata on groups is
> > not on my radar as something that needs to be optional for
> > performance reasons. Ok? :)
>
> I think there is an issue, however, that will impact performance right
> after the patching.
>
> After patching and starting up the loader I see a couple of million
> new rows added to GROUPER_CHANGE_LOG_ENTRY_TEMP. Those rows include
> things like 'etc:attribute:loaderMetadata:grouperLoaderMetadataLoaded'
> and
> 'etc:attribute:loaderMetadata:grouperLoaderMetadataLastFullMillisSince1970'.
>
> Since all of those rows have to be processed and moved from
> GROUPER_CHANGE_LOG_ENTRY_TEMP to GROUPER_CHANGE_LOG, and then the
> various change log consumers have to process each of those rows, any
> "real" changes in group memberships are not going to be processed for
> quite some time.
>
> My plan to avoid this is:
>
> - make sure all "real" work is processed - stop the loader - delete
> loader jobs - patch - start the loader - wait for the change log temp
> to stop growing - stop the loader - truncate
> GROUPER_CHANGE_LOG_ENTRY_TEMP - truncate GROUPER_CHANGE_LOG_ENTRY -
> re-create the loader jobs - start the loader
>
> Will that work to avoid the extra millions of rows in the change log?
>
> Thanks,
>
> Scott K



Archive powered by MHonArc 2.6.19.

Top of Page