Daily Log for #alfresco IRC Channel

Alfresco discussion and collaboration. Stick around a few hours after asking a question.

Official support for Enterprise subscribers: support.alfresco.com.

Joining the Channel:

Join in the conversation by getting an IRC client and connecting to #alfresco at Freenode. Our you can use the IRC web chat.

More information about the channel is in the wiki.

Getting Help

More help is available in this list of resources.

Daily Log for #alfresco

2017-03-06 06:42:17 GMT <Sandy> I EveryOne, i need to upload bulk files into alfresco with association(with metadata) using excel sheet.., can anyone help me please.

2017-03-06 07:03:42 GMT <Sandy> I EveryOne, i need to upload bulk files into alfresco with association(with metadata) using excel sheet.., can anyone help me please.

2017-03-06 07:57:54 GMT * yreg wished every one on this channel a good morning !

2017-03-06 10:32:53 GMT * AFaust loves obscure bugs caused by background processes and a poor script API integration: https://issues.alfresco.com/jira/browse/ALF-21875

2017-03-06 10:42:41 GMT <bhagyas> AFaust: Interestingly looks like it's more of a CE issue, expect a WONT FIX ;p

2017-03-06 10:43:27 GMT <bhagyas> Since EE and CE has different cache implementations (as we discussed on Friday)

2017-03-06 10:43:38 GMT <AFaust> It very likely affects EE just as well, but I currently don't have an EE handy / can't be bothered to test on each and every variation

2017-03-06 10:44:01 GMT <AFaust> But yes - there is a chance that the cache implenentaiton may shield from it

2017-03-06 10:44:31 GMT <bhagyas> It sucks when you can't reliably build/test code for both platforms :/

2017-03-06 10:44:36 GMT <AFaust> Looking in caches.properties to check

2017-03-06 10:44:54 GMT <Loftux> Since it has worked like this for a long time, and no one else but AFaust has reported it, and the dev team is busy, WON'T FIX

2017-03-06 10:46:04 GMT <AFaust> I mean - the root of the issue isn't actually with the cache - I haven't checked yet but I would assume that if I don't do the getSite(name) call to force the cache issue, there might be other errors later on relating to the partial ContentData

2017-03-06 10:46:55 GMT <AFaust> Ok - so the cache is defined as fully-distributed which means the implementation will be different in EE (anything other than fully-distributed and EE actually uses the same local implementation - it may just add a facade for invalidation)

2017-03-06 10:47:12 GMT <bhagyas> xD

2017-03-06 10:47:18 GMT <bhagyas> there you go

2017-03-06 10:47:37 GMT <AFaust> Ahhh - but luckily, if I remove the getSite(name) call it still fails with a NPE - just somewhere else

2017-03-06 10:48:01 GMT <bhagyas> If a cache throws null, that shouldn't break any of application code, since caches are typically expected to handle such

2017-03-06 10:48:07 GMT * AFaust is sad that the words "luckily" and "NPE" have to be used in the same sentence...

2017-03-06 10:48:11 GMT <bhagyas> (gracefully)

2017-03-06 10:50:05 GMT <AFaust> Turns out the IncompleteNodeTagger will also check use NodeService.getProperties() and thus trigger the TagScopePropertyMethodInterceptor which passes null to the cache.get() operation.

2017-03-06 10:50:20 GMT <AFaust> But again - only an issue with CE cache implementation

2017-03-06 10:50:23 GMT <AFaust> sigh

2017-03-06 10:50:34 GMT <bhagyas> there you go again :)

2017-03-06 10:51:48 GMT <bhagyas> (and then you find out you can actually fix it, only if you had the ability to make a contribution much quicker than the time it takes to explain it to noobs)

2017-03-06 10:51:50 GMT <bhagyas> ;)

2017-03-06 10:52:24 GMT <bhagyas> so we complete the circle xD

2017-03-06 10:53:16 GMT <bhagyas> and the number of product managers ;p

2017-03-06 10:53:27 GMT <AFaust> One of the utilities I had when I still worked at PRODYNA would have actually prevented the whole thing.

2017-03-06 10:53:33 GMT <bhagyas> I'm sure there is at least one product manager for each layer in Alfresco Platform ;p

2017-03-06 10:53:54 GMT <bhagyas> So we just need to find the product manager in charge of cache

2017-03-06 10:54:02 GMT <AFaust> Because it is absurd to have null values persist on the database, I had written a small AOP interceptor for the NodeDAO layer to simply strip out all the nulls

2017-03-06 10:54:31 GMT <bhagyas> AFaust: I think NULL values should persist, but any translation layer should handle them gracefully

2017-03-06 10:55:13 GMT <AFaust> I see no inherent semantic value to null values - so why would you want to persist them?

2017-03-06 10:55:50 GMT <AFaust> It just bloats the DB

2017-03-06 10:56:01 GMT <bhagyas> Those are things that apply when database optimisations come into place

2017-03-06 10:56:07 GMT <bhagyas> ah you mean ignoring in total

2017-03-06 10:56:10 GMT <bhagyas> got it

2017-03-06 10:56:31 GMT <MagdaLenA> I need help with connecting one project and a workflow, so i can test them locally and not in production. I am doing something wrong with connecting them, i added the workflow (groupId, artifactId and version). Did mvn install after that to the workflow, but still nothing. I

2017-03-06 10:56:47 GMT <MagdaLenA> If anyone can help me. I'd be grateful :)

2017-03-06 10:56:58 GMT <bhagyas> MagdaLenA: Did you package with -Denv=local?

2017-03-06 10:57:07 GMT <bhagyas> if yes, remove it and try

2017-03-06 10:58:07 GMT <MagdaLenA> bhagyas: hmm no i didn't. So i should try mvn install -Denv=local? I'll give it a try now

2017-03-06 10:58:37 GMT <MagdaLenA> i though i am doing something wrong in the pom.xml file when adding it as a dependecy

2017-03-06 10:58:46 GMT <bhagyas> use env=local for local, otherwise use something else than local

2017-03-06 10:59:01 GMT <MagdaLenA> thanks a lot, i'll give it a try now

2017-03-06 10:59:12 GMT <bhagyas> it would simply ignore the config bundle if you use a non-existent env name

2017-03-06 10:59:18 GMT <bhagyas> oki :)

2017-03-06 11:32:44 GMT <Magdalena> i tried connecting adding a custom workflow in a new project, but i am doing something wrong. i tried mvn install -Denv=local everything builds fine, but the workflow isn't showing in the other project

2017-03-06 11:33:03 GMT <Magdalena> am i doing something wrong when adding the workflow in the project as a dependecy?

2017-03-06 11:33:43 GMT <Magdalena> i am doing this so i can test it locally, before production

2017-03-06 11:33:49 GMT <DarkStar1> Hello people

2017-03-06 11:55:28 GMT <fwu> hi all!

2017-03-06 12:10:14 GMT <Magdalena> i need help with joining two projects in one

2017-03-06 12:10:37 GMT <Magdalena> a project and a workflow, because i want to test it locally, before production

2017-03-06 12:25:13 GMT <AFaust> Magdalena: You already asked that before. Did you try the recommendation bhagyas gave you?

2017-03-06 12:25:28 GMT <AFaust> Otherwise it is not necessary to repeat your question over and over

2017-03-06 12:25:54 GMT <AFaust> Instead, you should probably try to give more detailed information

2017-03-06 12:26:34 GMT <AFaust> i.e. it is unclear what kind of Maven setup you are using (SDK or custom, and if SDK if you are using AIO or other archetype)

2017-03-06 13:18:57 GMT <Magdalena> AFaust: I am sorry for the repeat, after repeating it a I saw the log. I am using sdk maven and AIO.

2017-03-06 13:19:25 GMT <Magdalena> I tried what the other user told me, everything goes well, but the workflow won't add to the list with the other workflows

2017-03-06 13:20:04 GMT <AFaust> You mean the list in Share UI? Did you add the necessary configuration in share-config-custom.xml?

2017-03-06 13:21:26 GMT <Magdalena> a friend told me to just add config of the workflow in the pom.xml in the main project and just do mvn install on the workflow. Yeah i mean the list in share UI, when i run it

2017-03-06 13:21:41 GMT <Magdalena> i haven't changed anything in share-config-custom.xml

2017-03-06 13:24:34 GMT <Magdalena> in the workflow project everything is fine, if i run it by itself it works...

2017-03-06 13:33:18 GMT <yreg> AFaust, How confident are you in the metrics for caches shown in OOTBee ST

2017-03-06 13:33:19 GMT <yreg> ?

2017-03-06 13:33:48 GMT <AFaust> As confident I can be with metrics collection that I have not written myself...

2017-03-06 13:33:56 GMT <yreg> I have set custom caches setting, for the highlighted caches, all include ttl=0

2017-03-06 13:34:01 GMT <yreg> http://imgur.com/a/jJEND

2017-03-06 13:34:02 GMT <alfbot> Title: Imgur: The most awesome images on the Internet (at imgur.com)

2017-03-06 13:34:27 GMT <yreg> and I get a number of misses larger than #size

2017-03-06 13:34:51 GMT <AFaust> So far so good...

2017-03-06 13:35:06 GMT <AFaust> Nothing necessarily wrong with that

2017-03-06 13:35:21 GMT <yreg> how so ?

2017-03-06 13:35:27 GMT <yreg> 4M+ misses

2017-03-06 13:35:41 GMT <yreg> with 0 evictions

2017-03-06 13:35:57 GMT <yreg> with 1.2M size

2017-03-06 13:36:08 GMT <AFaust> Well - a miss is just the information that some code performed a get() call on the cache and did not retrieve a result. Who is to say that the element the code wanted to retrieve actually exists and could be loaded into the cache afterwards?

2017-03-06 13:36:35 GMT <AFaust> Also, there is no requirement that a get() miss result in a the load of the data afterwards

2017-03-06 13:37:41 GMT <yreg> I still do not understand, if it misses then I assume it should go and fetch the node from DB

2017-03-06 13:38:05 GMT <yreg> so the subsequent get for that node should hit, not miss again

2017-03-06 13:38:42 GMT <yreg> unless we get a lot of get at the same time befor the node is actually loaded from the DB to the cache.. which does not make much sense to me

2017-03-06 13:39:36 GMT <AFaust> You forget lookups for nodes that don't actually exist. E.g. you can have a d:noderef property and the node that the value references no longer exists, then you will have a miss.

2017-03-06 13:40:22 GMT <AFaust> Also, the node cache is used for two-way lookups, i.e. lookup by key (Long ID) and lookup by value (node instance incl. version and txn ID etc.)

2017-03-06 13:41:16 GMT <AFaust> (which is the reason why you usually need 2x the size to hold a specific amount of nodes)

2017-03-06 13:42:22 GMT <yreg> well the first argument is more convincing than the last one

2017-03-06 13:42:46 GMT <yreg> although I doubt I would have that many missing nodes

2017-03-06 13:42:47 GMT <AFaust> You should look at the implementation of NodeDAOImpl and EntityLookupCache...

2017-03-06 13:43:08 GMT <AFaust> There are some operations which only try to read from cache and don't load data if no cache entry is found

2017-03-06 13:43:21 GMT <yreg> but storing nodes twice in the cache with multiple keys does not seem like a sane thing to do

2017-03-06 13:43:59 GMT <AFaust> i.e. https://github.com/Alfresco/community-edition-old/blob/master/projects/repository/source/java/org/alfresco/repo/domain/node/AbstractNodeDAOImpl.java#L4557

2017-03-06 13:43:59 GMT <yreg> what if one of these two entries changes ? is the change forwarded to the other one as well ?

2017-03-06 13:44:00 GMT <alfbot> Title: community-edition-old/AbstractNodeDAOImpl.java at master · Alfresco/community-edition-old · GitHub (at github.com)

2017-03-06 13:44:23 GMT <AFaust> But it is what Alfresco does - the same node may be cached by ID and its entity object

2017-03-06 13:44:51 GMT <AFaust> And when they remove an entry, the EntityLookupCache internally removes both entries

2017-03-06 13:45:32 GMT <AFaust> https://github.com/Alfresco/community-edition-old/blob/master/projects/repository/source/java/org/alfresco/repo/cache/lookup/EntityLookupCache.java#L741

2017-03-06 13:45:33 GMT <alfbot> Title: community-edition-old/EntityLookupCache.java at master · Alfresco/community-edition-old · GitHub (at github.com)

2017-03-06 13:46:17 GMT <AFaust> A change is always handled in the same way: remove and re-add on next read

2017-03-06 13:46:41 GMT <yreg> seems a bit unefficient if you ask me

2017-03-06 13:47:22 GMT <AFaust> Correction: A change for such double-cache entiies is always handled that way - other cache data may simply be updated

2017-03-06 13:49:34 GMT <AFaust> Another correction: I actually looked at updateNode() and they do just set the new value, which also removes the old cached values

2017-03-06 13:49:44 GMT <AFaust> https://github.com/Alfresco/community-edition-old/blob/master/projects/repository/source/java/org/alfresco/repo/cache/lookup/EntityLookupCache.java#L641

2017-03-06 13:49:45 GMT <alfbot> Title: community-edition-old/EntityLookupCache.java at master · Alfresco/community-edition-old · GitHub (at github.com)

2017-03-06 13:50:41 GMT <AFaust> So not all use cases of double-cached entities behave the same. Might have been in the past and I just remember the "good ol' days"

2017-03-06 13:55:18 GMT <AFaust> yreg: And yes, the default caches aren't as efficient as you would hope, but that usually is related more to their memory footprint and effect on GC then how updated data is handled

2017-03-06 13:58:43 GMT <AFaust> Also good to have these questions asked / discussed here... reminds me about how much could be covered in the one talk I proposed...

2017-03-06 14:17:23 GMT <Magdalena> bhagyas: I just wanna thanks for helping me. After deleting it and trying again i am finally moving forward. Thanks

2017-03-06 16:40:17 GMT <fwu> brb

2017-03-06 17:47:33 GMT <fwu> back

2017-03-06 17:47:42 GMT <fwu> douglascrp!

2017-03-06 17:47:51 GMT <douglascrp> fwu, hello

2017-03-06 18:02:45 GMT <fwu> ppl, when saving a document in the same Alfresco folder I get an error telling it is a duplicated document. Can I have Alfreso adding automatically a sufix to the document name?

2017-03-06 18:03:41 GMT <yreg> fwu define saving

2017-03-06 18:03:52 GMT <yreg> uploading ?

2017-03-06 18:17:08 GMT <fwu> yes

2017-03-06 18:22:22 GMT <fwu> brb

2017-03-06 18:39:46 GMT <yreg> ~later tell fwu there is a flag for overwriting existing files and one other for uploading new version

2017-03-06 18:39:46 GMT <alfbot> yreg: The operation succeeded.

2017-03-06 18:40:04 GMT <yreg> ~later tell fwu you can set either of them

2017-03-06 18:40:04 GMT <alfbot> yreg: The operation succeeded.

2017-03-06 20:02:58 GMT <alfbot> fwu: Sent 1 hour and 23 minutes ago: <yreg> there is a flag for overwriting existing files and one other for uploading new version

2017-03-06 20:02:59 GMT <alfbot> fwu: Sent 1 hour and 22 minutes ago: <yreg> you can set either of them

2017-03-06 20:03:00 GMT <fwu> back

2017-03-06 20:03:18 GMT <fwu> yreg, thank you!

2017-03-06 20:03:21 GMT <fwu> where I set that?

2017-03-06 20:11:31 GMT <fwu> yreg, but isn´t there an option to upload a file as a new file, but with its name with a sufix like this: (number)

2017-03-06 20:19:43 GMT <fwu> yreg, but isn´t there an option to upload a file as a new file, but with its name with a sufix like this: (number) :)

2017-03-06 20:23:01 GMT <fwu> similar as in windows, where the filename automatically chnages

End of Daily Log

The other logs are at http://esplins.org/hash_alfresco