[Asterisk-code-review] media cache: Add a core API and facade for a backend agnosti... (asterisk[master])

Joshua Colp asteriskteam at digium.com
Thu Jul 9 08:41:10 CDT 2015


Joshua Colp has posted comments on this change.

Change subject: media cache: Add a core API and facade for a backend agnostic media cache
......................................................................


Patch Set 5: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/487/5/main/media_cache.c
File main/media_cache.c:

Line 166: 	ast_db_put(hash, "path", bucket_file->path);
Shouldn't this store all metadata?

Right now it looks like if you repopulate from the astdb your metadata will be incomplete.


Line 426: 	return ast_media_cache_create_or_update(uri + AST_DB_FAMILY_LEN, path, NULL);
I don't think this usage is right here.

If you are repopulating from the astdb shouldn't you:
1. Check backend to see if it is stale
2. Put it into the memory cache, leaving backend alone

Otherwise you could get into a scenario where you delete from backend, bring Asterisk back up, astdb repopulates the memory cache and backend, rinse and repeat.


-- 
To view, visit https://gerrit.asterisk.org/487
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I11227abbf14d8929eeb140ddd101dd5c3820391e
Gerrit-PatchSet: 5
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list