Hana Delta merge (mergedog) event on fresh system - hana

After a fresh install of Hana SPS12 I get this event:
Delta merge (mergedog) configuration ( ID 10 )
Determines whether or not the 'active' parameter in the 'mergedog'
section of system configuration file(s) is 'yes'. mergedog is the
system process that periodically checks column tables to determine
whether or not a delta merge operation needs to be executed.
If this operation is so important why is it not a default setting? Why do I have to change this setting?

This operation is important. Therefore the default setting for Mergedog active is yes. The system checks the setting and alerts like reported. See alert message above.
This check should not be done for services without own persistence like dpserver. There was a useless check for dpserver which caused that wrong alert.
You may ignore the alert for now and change the setting. Finally it will go away after next upgrade.

Related

Supplemental logging error when mapping tables from CDC on SQL Server

The source is SQL Server 2016 and Target is Netezza 7.2
When a source table is being mapped to the target, The below message appears,
ERROR:
An error has occurred while setting the replication method for dbo.CCM [An error occurred while turning on supplemental logging for dbo.CCM.
Failed to get publication ID.]. Check the event log for related events and a possible cause.
SQL Server Replication is enabled with a local distributor database. We have checked the CDC event logs and the same error is logged, nothing much in detail.
Any help on this would be appreciated.
You need to check the trace files. These are located in whichever folder you selected for instance data in the install. If you do not know this you can look at /conf/userfolder.vmargs - /instance/log
If you cannot find any useful information, then turn on detailed traces
1.) Management Console, configuration perspective, select the MS SQL Server datastore, properties, system parameters
2.) Add a new parameter global_trace_hours and specify a numeric value say 4
3.) Save
4.) The tracing is enabled dynamically - tracing will be set on for the number of hours you specify. The value will be automatically decremented every minute and then when it gets to 0 tracing is automatically and dynamically disabled
5.) Attempt to change the replication method to mirror again
6.) In the folder /instance/log/on you should find some files with data in
7.) Copy the trace file to a location with a short path (e.g. C:\TEMP) - or if it has already been zipped, unzip to C:\TEMP
8.) Open a command prompt as administrator
9.) Change directory to /bin
10.) Execute dmdecodetrace C:\TEMP\ | more
Note that the additional trace files are not full text, to minimize the impact of writing them, so need to be decoded
If you still do not get any pointers open a support ticket.
One potential cause could be that the table does not have a primary key. SQL replication requires a primary key, and as CDC is using the SQL replication to ensure that the full row images are logged in the transaction log, it is also a prereq for CDC as well.

How to define an optional change set in Liquibase?

We use Liquibase as database refactoring tool in a cloud service, and would now like to employ it to do some lightweight data migration, which would be realized as CustomTaskChange and would take just a few seconds. This data migration is 'nice to have' but it is by no means mandatory for the service to function properly - if it fails for some reason, the change set should just be skipped, the service started nevertheless, and the change set retried during the next restart of the service until it finally succeeds. So, errors when executing the change set should be ignored but the set marked as ran only after it actually ran successfully once.
We wonder how we could implement this kind of behavior using Liquibase: The <changeSet> attribute failOnError="false" continues in case of an error but according to documentation and an answer given by Nathan Voxland here at StackOverflow it always marks the change set as ran - hence Liquibase wouldn't retry to execute it during the next startup of the service. The <preConditions> attribute onFail seems to be concerned only with failing preconditions so startup would still fail in case of an error when setting onFail to, say, CONTINUE.
Is there any other option / attribute that we overlooked or a recommended fashion to solve this kind of situation?
You may be able to achieve the "retry until successful" behaviour if you implement the optional data migration inside the code of a custom precondition. Then, you could configure onFail of that precondition to CONTINUE which will give you the behaviour you want (source):
CONTINUE – Skip over the change set. Execution of the change set will be attempted again on the next update. Continue with the change log.
I'm not entirely sure if implementing the migration in the precondition code is technically possible – because it certainly wasn't meant for such things. And you also may want to verify that the custom precondition is not executed again once the patch set has been marked as ran.

Accurev - why not Auto-Update?

Why isn't it standard behavior for Accurev to automatically run an "Update" upon opening the program? "Update" updates a user's local sandbox with the latest files from the building/promoted area.
It seems like expected functionality that the most recent files should be synchronized first.
I'm not claiming that it should always update, but curious as to why an auto-Update wouldn't be correct.
Auto-updating could produce some very unwanted results.
Take this scenario: you're in the middle of a development task, but you've made a mistake and need to revert a file that you just modified. So you open AccuRev, but before you have a chance to "revert to most recent version", you are bombarded with 100 files that have been changed upstream including the one you want to revert. You are now forced into the position of resolving all the merge conflicts before your solution will build, including the merge of your (possibly unstable) code in progress.
Requiring the user to manually update keeps a protective 'bubble' around the developer, allowing them to commit (keep) changes within their own workspace without bringing down code changes that could destabilise the work in their sandbox. When the developer gets to a point where his code is ready to share with others, that is the appropriate time to do an update and subsequently build/retest the merged codebase before promoting.
However there is one scenario that I do believe auto-updating could be useful: after a workspace is reparented. i.e. when a developer's workspace is moved from one part of the stream hierarchy to another. Every time we reparent we have to do a little dance:
Accept the confirmation dialog that reminds us (rather verbosely) that we need to update our workspace before we can promote any changes.
Double-click the workspace to view its files.
Wait for AccuRev to do a "Pending" search, to determine whether any file changes are waiting to be committed.
And finally, perform the Update.
Instead of just giving us a confirmation dialog, it would be nice if AccuRev could just ask us if we want to Update immediately.
I guess it depends on preference. I for one wouldn't like the auto-update feature.
Imagine you have a huge project and you don't want to build it every time you start Accurev. But you also can't debug because the source files and debugging info no longer correspond.

How to override edit locks

I'm writing a WLST script to deploy some WAR's and an EAR. However, intermittently, the script will time out because it can't seem to get an edit lock (this script is part of a chain of many other scripts). I was wondering, is there a way to override or stop any current locks on the server? This is only a temporary solution, but in the interest of time, it will do for now.
Thanks.
You could try setting a wait period and timeout:
startEdit([waitTimeInMillis], [timeoutInMillis], [exclusive]).
Are other scripts erroring out, leaving the session locked? You could try adding exception handling around those. Also, if you have 'Automatically acquire lock" enabled in the Admin Console and you use the admin console sometimes it can cause problems if you are running scripts at the same time, even though you are not making "lock-requiring" changes.
Also, are you using the same user for the chained scripts?
Within WLST, you can pass a number as a parameter to gain an exclusive lock. This allows the script to grab a different lock than the regular one that's used whenever an administrator locks from the console. It also prevents two instances of the same script from stepping on each other.
However, this creates complex change merge scenarios that are best avoided (by processes).
Oracle's documentation on configuration locks can be found here.
Alternatively, if you want the script to temporarily relieve any existing locks regardless of the pending changes, you may as well disable change management from the console, minimizing the inconvenience caused.
WLST also contains the cancelEdit command that you could run before you startEdit. Hope one of these options pan out!
To take the configuration change lock from another administrator:
If another administrator already has the configuration lock, the following message appears: Another user already owns the lock. You will need to either wait for the lock to be released, or take the lock.
Locate the Change Center in the upper left corner of the
Administration Console.
Click Take Lock & Edit.
Make your configuration changes.
In the Change Center, click Activate Changes. Not all changes take
effect immediately. Some require a restart (see Use the Change
Center).
As long as you're running WLST as an administrative user, you should be able to jump into an existing edit session with the edit() command - I've done a quick test with two admin users, one in the Admin Console, and one using WLST, and it appears to work fine - I can see the changes in the Admin Console session inside the WLST interpreter.
You could put a very simple exception handler around your calls to startEdit that will log the exception's stack trace, but do nothing else. And then rely on the edit call to pop you into the change session.
Relying on that is going to be tricky though if another script has started an edit session and is expecting to be able to commit that change session itself - you'll be getting exceptions and unreliable behaviour across multiple invocations.

TeamCity: Managing deployment dependencies for acceptance tests?

I'm trying to configure a set of build configurations in TeamCity 6 and am trying to model a specific requirement in the cleanest possible manner way enabled by TeamCity.
I have a set of acceptance tests (around 4-8 suites of tests grouped by the functional area of the system they pertain to) that I wish to run in parallel (I'll model them as build configurations so they can be distributed across a set of agents).
From my initial research, it seems that having a AcceptanceTests meta-build config that pulls in the set of individual Acceptance test configs via Snapshot dependencies should do the trick. Then all I have to do is say that my Commit build config should trigger AcceptanceTests and they'll all get pulled in. So, lets say I also have AcceptanceSuiteA, AcceptanceSuiteB and AcceptanceSuiteC
So far, so good (I know I could also turn it around the other way and cause the Commit config to trigger AcceptanceSuiteA, AcceptanceSuiteB and AcceptanceSuiteC - problem there is I need to manually aggregate the results to determine the overall success of the acceptance tests as a whole).
The complicating bit is that while AcceptanceSuiteC just needs some Commit artifacts and can then live on it's own, AcceptanceSuiteA and AcceptanceSuiteB need to:
DeploySite (lets say it takes 2 minutes and I cant afford to spin up a completely isolated one just for this run)
Run tests against the deployed site
The problem is that I need to be able to ensure that:
the website only gets configured once
The website does not get clobbered while the two suites are running
If I set up DeploySite as a build config and have AcceptanceSuiteA and AcceptanceSuiteB pull it in as a snapshot dependency, AFAICT:
a subsequent or parallel run of AcceptanceSuiteB could trigger another DeploySite which would clobber the deployment that AcceptanceSuiteA and/or AcceptanceSuiteB are in the middle of using.
While I can say Limit the number of simultaneously running builds to force only one to happen at a time, I need to have one at a time and not while the dependent pieces are still running.
Is there a way in TeamCity to model such a hierarchy?
EDIT: Ideas:-
A crap solution is that DeploySite could set a 'in use flag' marker and then have the AcceptanceTests config clear that flag [after AcceptanceSuiteA and AcceptanceSuiteB have completed]. The problem then becomes one of having the next DeploySite down the pipeline wait until said gate has been opened again (Doing a blocking wait within the build, doesnt feel right - I want it to be flagged as 'not yet started' rather than looking like it's taking a long time to do something). However this sort of stuff a flag over here and have this bit check it is the sort of mutable state / flakiness smell I'm trying to get away from.
EDIT 2: if I could programmatically alter the agent configuration, I could set Agent Requirements to require InUse=false and then set the flag when a deploy starts and clear it after the tests have run
Seems you go look on the Jetbrains Devnet and YouTrack tracker first and remember to use the magic word clobber in your search.
Then you install groovy-plug and use the StartBuildPrecondition facility
To use the feature, add system.locks.readLock. or system.locks.writeLock. property to the build configuration.
The build with writeLock will only start when there are no builds running with read or write locks of the same name.
The build with readLock will only start when there are no builds running with write lock of the same name.
therein to manage the fact that the dependent configs 'read' and the DeploySite config 'writes' the shared item.
(This is not a full productised solution hence the tracker item remains open)
EDIT: And I still dont know whether the lock should be under Build Parameters|System Properties and what the exact name format should be, is it locks.writeLock.MYLOCKNAME (i.e., show up in config with reference syntax %system.locks.writeLock.MYLOCKNAME%) ?
Other puzzlers are: how does one manage giving builds triggered by build completion of a writeLock task read access - does the lock get dropped until the next one picks up (which would allow another writer in) - or is it necessary to have something queue up the parent and child dependency at the same time ?