Unsolved
This post is more than 5 years old
4 Posts
0
4336
October 18th, 2010 11:00
Extending expiry of clip using .NET SDK (FPSDK)
I have written a clip to Centera with an expiry, now I wish to extend the expiry. When I set new expiry, its giving a new clip (thats fine), but the new expiry is not correctly set. It is setting expiry few minutes less than what I set. For example, Initial expiry for the clip is set as 10/19/2010. Expiry is shown as 10/19/2010 12:00 AM (which fine). But now when I set new expiry as 10/20/2010, expiry is shown as 10/19/2010 11:55 PM.
I tried this again with another clip, now its shown as 10/19/2010 11:45 PM.
Issue is only when I extend expiry (first time when writing its fine)
Below is the code used to extend expiry
FPPool pool = null;
FPClip clipref = null;
try
{
try { pool = new FPPool(connectionString);}
catch (Exception exec) {throw;}
try {clipref = new FPClip(pool, clipId, FPMisc.OPEN_ASTREE);}
catch (Exception exec){throw;}
clipRef.RetentionExpiry = new dateTime(2010,10,20);
string clipId = clipref.Write();
Environment: ASP.NET web application using FPSDK
Appreciate any help
gstuartemc
2 Intern
•
417 Posts
0
October 18th, 2010 12:00
What does the debugger show when the new RetentionExpiry is being calculated - I presume you done done this? If not, then that would be the area to examine.
madhuranju
4 Posts
0
October 18th, 2010 12:00
Hi Graham, I see your point, but if thats the case there should be a difference first time as well.
When I add clip first time, expiry is set correctly. But when I extend the expiry then I see this issue
Thanks
madhuranju
4 Posts
0
October 18th, 2010 12:00
Debugger shows few minutes less than what I set. Not consistent but usually 10 or 15 mins less
Thanks
gstuartemc
2 Intern
•
417 Posts
0
October 18th, 2010 12:00
Well if you can see that happening in the debugger then it should be easy enough to see what is causing the problem. Are you perhaps picking up a different time source between application servers?
RetentionExpiry is calculated by adding RetentionPeriod to the clip CreationDate. You should check what these values are set to within the clip - it may be that the creation time is not what you think it is - it is based upon the time on the cluster, not your application server, and these may differ.
gstuartemc
2 Intern
•
417 Posts
0
October 20th, 2010 06:00
OK - so check if anything looks wrong with the values being used when you extend it. You should be able to do this by inspecting the values of the variables using the debugger and comparing them with what you think the appropriate values should be.
madhuranju
4 Posts
0
October 20th, 2010 12:00
Hi Graham, In my first post, I have pasted the code piece I am using. Could you kindly confirm that what I am doing is correct. I am directly setting RetentionExpiry (not retention period)
Thanks for your help
gstuartemc
2 Intern
•
417 Posts
0
November 5th, 2010 06:00
And RetentionExpiry then sets the retention period on the clip using (expiry time - current time) to work it out. You need to examine these values to work out what is going on.
The .NET wrapper is an OpenSource Community Tool (not an EMC SDK) so you have 100% debug capability to investigate this.