Integrating newest combinator code with V1.8.1

Mar 9, 2015 at 2:26 PM
I'm trying to integrate the newest version of Combinator with our Orhcard V1.8.1 and running into a few issues.

Where ever there is a reference to:
I'm seeing the error that it is inaccessible due to it's protection level (and it's in the System namespace).

Also, the code is referencing a ".Monitor" and ".Trigger" method of the cache service. Our external cache we use for the web farm is Couchbase/memcache and we don't have those methods implemented. What is the purpose of these calls, and by the way, what external cache do you use for your web farm environments, AppFabric?

Mar 9, 2015 at 5:28 PM
Both UriHelper and the Monitor, Trigger methods you mention are parts of Helpful Libraries. Please add the latest version (from the source on the project page) of HL as Combinator will need that. HL also has corresponding documentation on the purpose of all these.

Monitor, Trigger are extensions on Orchard.Caching ICacheService so as long as you have a distributed cache provider (and there are such implementation already in Orchard for Orchard.Caching) it will work in a web farm.
Mar 11, 2015 at 7:50 PM
Thanks - that succeeded in a successful compile. One more question for you please - I disabled combinator prior to 1st run on the new code. Then, once I got the dashboard up I re-enabled Combinator and Combinator Upgrade. Now I'm just getting the message that combinator needs to be updated. Is there some step I need to do to do the upgrade to the new version? I've tried the Update button on the modules page, it doesn't appear to do anything.
Mar 16, 2015 at 11:01 AM
Hmm, if you start with 1.8.1 you don't need Combinator Upgrade, so don't enable that. Other than that it should just work, if there are any issues then it's not a known bug. If you have something relevant in the logs it might give you some pointers.
Mar 22, 2015 at 7:35 PM
Finally had a chance to look at what's going on. The new code is tripping up because it can't find the Fingerprint column in the Piedone_Combinator_CombinedFileRecord table. My table has the following columns but not that one: Id, Hashcode, Slice, Type, LastUpdateUtc, Settings.

2015-03-22 13:23:22,232 [45] ERROR Orchard.Data.Migration.DataMigrationManager - Default - An unexpected error occurred while applying migration on Piedone.Combinator from version 10
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> NHibernate.Exceptions.GenericADOException: could not execute query
[ select combinedfi0_.Id as Id902_, combinedfi0_.Fingerprint as Fingerpr2_902_, combinedfi0_.Slice as Slice902_, combinedfi0_.Type as Type902_, combinedfi0_.LastUpdatedUtc as LastUpda5_902_, combinedfi0_.Settings as Settings902_ from IQ_Piedone_Combinator_CombinedFileRecord combinedfi0_ ]
Mar 22, 2015 at 8:06 PM
Try to comment out the _cacheFileService.Empty(); calls in Migrations.
Mar 23, 2015 at 7:25 PM
That worked Zoltan! Thanks very much for the help.

I did notice one bug when the migration script was trying to run. My default site has a table prefix, and when it went to delete the index IQ_Piedone_Combinator_CombinedFileRecord.File it did not prepend the index name with the prefix, e.g., ABC_File. I just renamed my index and then it worked fine.
Mar 23, 2015 at 7:55 PM
Great! Index names should be dealt with by Orchard and modules aren't required to handle this. If the index name clashes in multiple tenants then that is an Orchard bug, but I haven't seen such issues before (and on DotNest ever tenant has Combinator enabled). Maybe it was a side effect of the faulty migration.
Mar 24, 2015 at 8:14 PM
I'm thinking it's specific to having a table prefix on the landlord. All my tenants worked fine with prefixes. Must be a core bug.
Apr 2, 2015 at 1:56 AM
I've released the new code to production, and so far so good. Thanks!

Wanted to give you some feedback, that I got the following message when restoring a database. It appears one of the indexes for the combinator is on a column that exceeds the maximum length:

Warning! The maximum key length is 900 bytes. The index 'CR_FileFingerprint' has maximum length of 2048 bytes. For some combination of large values, the insert/update operation will fail.
Apr 2, 2015 at 8:21 PM
Good catch, thanks! Fixed it, would you please try it out?