----- Original Message -----
> From: "Johannes Renner" <jren...@suse.de>
> To: spacewalk-devel@redhat.com
> Sent: Friday, January 17, 2014 12:30:09 PM
> Subject: [Spacewalk-devel] [PATCH] Allow null as createdBy and lastModifiedBy 
> for custom data values
> 
> Hello,
> 
> I found another issue with the custom data values: It's a known and fixed bug
> (889633)
> that the indexing job will crash when initially *not* setting the
> lastModifiedBy column.
> This column can still get null whenever a creator or modifier is deleted
> since there is
> a ON DELETE SET NULL on these columns. We therefore have to allow null there,
> please see
> and apply my attached patch.
> 
> This can also be problematic when there is values that were created before
> installing
> the fix for 889633. These will have null as lastModifiedBy as long as they
> have never
> been edited. Even after installing that fix, the old values will make the
> indexer crash.
> The attached patch will also fix such cases.
> 
> Otherwise what we see is the same exception as with the above bug and no
> custom data
> values are being indexed:
> 
> INFO   | jvm 1    | 2014/01/16 08:47:51 | --- Cause:
> java.lang.RuntimeException: Error setting
> property 'setLastModifiedBy' of
> 'com.redhat.satellite.search.db.models.ServerCustomInfo@75807580'.
> Cause: java.lang.IllegalArgumentException]
> INFO   | jvm 1    | 2014/01/16 08:47:51 |       at
> com.redhat.satellite.search.scheduler.tasks.GenericIndexTask.execute(GenericIndexTask.java:91)
> 
> Regards,
> Johannes
> 
> --
> SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer
> 
> _______________________________________________
> Spacewalk-devel mailing list
> Spacewalk-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/spacewalk-devel

Hello Johannes,

I'm not sure how to reproduce this. I tried to create user, create custom key, 
assign value to system, delete user, changing values...
Except some ISEs in WebUI, indexation works fine.
Even if tried to insert directly to db on clean PostgreSQL Spacewalk nightly:

insert into rhnServerCustomDataValue values (1000010000, 6, 'qwerty', null, 
null, current_timestamp, current_timestamp); -- with certain key and system, 
both values null

It properly indexed, after changing value too. I tested with searching by 
Custom Info.

Regards,
-- 
Jan Dobes
Satellite Engineering, Red Hat

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to