sys_TouchParentItems touching too many items

Hi

I’ve noticed on a system I’m currently working on (rx 5.71) that the incremental publishhing run contains a large number of items.

On further investigation I noticed that most of the item’s last transition date was some time ago. I ran the below query to see how the content was group as I know when sys_TouchParentItems is run it set all touched items to have the same contentlastmodified date.

select	contentlastmodifieddate, count(*)
from 	contentstatus
	inner join states on contentstatus.contentstateid = states.stateid
		and contentstatus.workflowappid = states.workflowappid
where 	contentvalid in ('y','i')
and 	contentlastmodifieddate > '2007-11-27 00:00:00.000'
group by contentlastmodifieddate
order by contentlastmodifieddate desc

most items have a count of 1 or 2 apart from these following rows:

2007-11-27 12:01:51.380 531
2007-11-27 09:22:33.473 152
2007-11-27 12:01:54.207 135

I’ve managed to find the items that were amended in order to touch so many items (ordered by the last transition date) but when looking at the relationship table these items only have a few parent relationships.

I’ve looked at the documentation and it mentions that the sys_TouchParentItems exit touches all ancestors. Does this means “All” ancestor or just the parent ancestor?

The content type in question is a collection of links to other parts of the site. So instead of inserting each individual link they insert a collection as a standard AA relationship.

How can I stop it from touching so many items? I only want it to touch the parent.

Cheers
James

[QUOTE=jimbo;732]I’ve looked at the documentation and it mentions that the sys_TouchParentItems exit touches all ancestors. Does this means “All” ancestor or just the parent ancestor?
[/QUOTE]
Yes, when it says ALL ancestors, it means ALL ancestors.

How can I stop it from touching so many items? I only want it to touch the parent.

There are only 2 ways that I know of:

  1. Upgrade to 6.x - we’ve changed the algorithm to be more selective
  2. Write your own Touch Parent Items and limit the depth of the touching.

I know that some customers who have done #2 (with assistance from our PSO team). The results have not been all that satisfactory, as it’s hard to know just how many levels to go without examining the slot relationships as you go.

There isn’t quite enough information in 5.x to know when to stop, which is why we bundled the change into 6.0.

Dave

Hi Dave

So by omitting (or setting it nothing) the ChildLink node in sys_ceDependency/parent.xml would this effective stop it from iterating up the tree and only touch the parent item?

I know this would have other implications just wanted to know.

Cheers
James

Don’t even think these thoughts. No, that would not work.

Dave

Hi Dave

I’ve come up with a solution.

I’m letting the content be touched by the exit but I create a content list which run a stored proc (attached) and untouches the content (sets the contentlastmodifeddate back to the lasttransitioned date) based on the original items, parents and parents parents. This content list is added as the first item in the edition. Seems to work fine on the dev server and dramatically reduces the lists of items in the edition.

Can you see any drawbacks to this?

Cheers
James

Only the obvious upgrade issues.

We have a similar problem using 6.50.

If an incremental publish is performed immediately after a full publish the majority of the content is re-published.

We experience this in the development and production environments. In our development environment the full publish outputs 466 items. The incremental outputs 262 items including all of our image content items.

We don’t use an auto index but do have about 12 or so slots using the Auto Slot Content Finder but these do not use our image content type directly (only in the template used by the slot may an image be referenced via another slot) - Will these items also be touched even though no content has changed between the full and incremental publishes?

Interestingly, if after a full publish one of the content lists in the incremental is previewed the contentlastmodifieddate in the contentstatus table is updated for 127 content items (A mixture of images, navons and other content types). In our production environment over 2000 items are updated.

It was mentioned that in 6.xx the touch parent is more selective how much more selective is it?
Also is it possible to find the reason why so much content is being republished?

Jason,

There are 2 parts to this question: what does Touch Parent Items do, and how does incremental publishing work. These are different (but related) questions.

Touch Parent items runs as a workflow action, and it modifies the “Last Modify Date” of any content item that transitions into or out of the public state. In addition to the item itself, the Active Assembly parent items are also touched, subject to the following rules:

  1. Direct parents of the transitioned item are always modified.
  2. Parents where the slot is an inline slot are always modified
  3. Parents where the selected snippet template also contains slots.

Therefore, parents in the 2nd and subsequent levels (grand parents) are not modified unless they include the parent item via an inline slot, or the parent snippet also contains other slots.

When an incremental edition is run the “incremental filter” runs:

  1. It determines all of the content types that have at least one publishable template for that site that contains at least one autoslot. All items of these content types are touched, and then the AA parents of these items are touched (following the 3 rules above). Note that an autoslot is any slot with a slot content finder OTHER than the relationship slot content finder or the Nav Slot content finder.

  2. It finds all items that are published on the site, by looking at the RXSITEITEMS table.

  3. All items in the content list which are found in RXSITEITEMS table, AND the content modfiy date is OLDER than the record in RXSITEITEMS, are removed from site items.

So, any item of a content type which contains at least one autoindex slot in at least one of its templates will be published EVERY TIME.

One other thing to look out for is that the RXSITEITEMS lookup currently will not find any items where the Template is not registered on the current site. We’ve had some instances where customers are publishing “unregistered” templates, and these items get republished every time. (This is a bug, and we plan to fix it in a near future release).

I would suggest that you first look at your templates. Are they allowable templates on that site? (in the workbench, open the template and look at the “sites” tab at the bottom of the window"). I would also look for any stray autoslots, especially ones you are not using.

In your case, since all images are publishing, chances are that the system thinks you have an autoslot on an image template.

I hope this helps

Dave

Hi Dave

I understand what you’re staying but It’s causing big problems. The problem is we have a contact details page on an intranet which updates a database. A windows service then updates the content items in Rhythmyx and database publishes the contents back out to the same database.

Each contact can select their manager which is lookup of contact content items. I then use this id to populate a autoslot with the contact item.

As you’ve explained all items with a autoslot will be part of an incremental but this means all contacts templates (HTML and database) will be published out on an incremental. For us this means about 4000 content items!!!

I could remove the autoslot from the template but this defeats the object of having the users update their own details.

Does the autoslot still work even if the slot is not set in the slot tab within the template definition? Can you just away with having the manual slots in the slot definition tab?

Cheers
James

This is the root of your problem, and it’s a very common mistake that I’ve seen at several different customers.

You have to use a slot relationship for things like this.

At some customers, we have used “Relationship builder” code to turn selections in a control into a relationship in the back end. If you can’t deal with that, then your option is to use the standard slot interface to select the manager.

As you point out, if you use an autoslot, you will wind up publishing the entire set. There are some other problems with this approach that I’m sure you’ll find if you use it long enough.

Dave

Hi Dave

  1. Write your own Touch Parent Items and limit the depth of the touching.

Since upgrading to 6 is not really an option we’re going to write our own action. Before we start work it safe to assume that the code Rhythmyx\Exits\Java\src\com\percussion\extensions\general\PSTouchParentItems.java and Rhythmyx\Exits\Java\src\com\percussion\extensions\general\PSTouchParentItemsBase.java is the actual code used in the exit?

Have there been updates? We’re using 5.71.

Cheers
James

Whatever is in the Java src directory is in fact the source code for these exits.

You can use the base class as is, and extend it to add the items you need.

Please note that these classes are NOT present in Rhythmyx 6.x, so anything you add now will have to be re-done when you do upgrade.

Dave