diff --git a/perl-xCAT/xCAT/DBobjUtils.pm b/perl-xCAT/xCAT/DBobjUtils.pm index 2c8a8212a..3e9fdafee 100644 --- a/perl-xCAT/xCAT/DBobjUtils.pm +++ b/perl-xCAT/xCAT/DBobjUtils.pm @@ -224,7 +224,7 @@ sub getobjattrs } } } - $thistable->commit; + #$thistable->commit; } } } @@ -614,7 +614,7 @@ sub getDBtable @{$::TableHash{$table}} = @rows; - $thistable->commit; + #$thistable->commit; } # end if not cached diff --git a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm index e0481855d..fdf70604c 100644 --- a/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm +++ b/xCAT-server/lib/xcat/plugins/DBobjectdefs.pm @@ -1155,6 +1155,7 @@ sub defmk xCAT::Table->new('nodelist', -create => 1, -autocommit => 0); my $newgroups; + my $changed=0; foreach my $n (@memberlist) { if ($::verbose) @@ -1192,11 +1193,13 @@ sub defmk if ($newgroups) { $tab->setNodeAttribs($n, {groups => $newgroups}); + $changed=1; } } - - $tab->commit; + if ($changed) { + $tab->commit; + } }