[#Feature] develop database, add uuid & name in tables#323
[#Feature] develop database, add uuid & name in tables#323mahdizynali wants to merge 13 commits intoHyperInspire:masterfrom
Conversation
There was a problem hiding this comment.
PR Summary:
This PR adds UUID and name (tname) fields to the face feature database tables to enhance identity management. Each face embedding now gets a unique UUID and associated name, enabling better tracking and identification. The changes include:
- Modified database schema to include
tnameanduuidcolumns - Added
GenerateUUID()function for unique identifier generation - Updated insertion APIs to require name parameters
- Added
GetAllTargetsNames()to retrieve name/UUID pairs - Updated search results to include target names
Review Summary:
Identified 6 critical issues requiring attention before merge. The main concerns are: (1) missing distance_metric parameter in table schema affecting similarity calculations, (2) thread-safety issue in UUID generation, (3) logic bug in GetAllTNames returning duplicates instead of unique names, (4) hardcoded "Target" name in C API breaking the new feature for C API users, (5) missing transaction rollback on batch insert failures violating database safety patterns, and (6) missing validation that vectors are normalized before storage.
Review performed using knowledge base standards for database transaction safety, API compatibility, and thread safety patterns.
Follow-up suggestions:
|
Unable to address comment. You have run out of credits 😔 |
Changed random number generation to use thread-local storage for better concurrency.
Added a new member 'tname' to the HFFaceFeatureIdentity struct.
Added normalization for input vectors before inserting into the database.
.:: Feature Introduction ::.
in this update database was developed more in order to contain name & uuid for each embedding face or may target.
for each inserting request you must pass a name as generating in database so automatically a unique hash will create by InsertVector function and reach The database. fore example :
if you put uuid section ans empty string, it will automatically generate uuid before inserting
when try to ViewDBTable :
Also i have develop some functions like GetAllTargetsNames which would return a vector pair of names & uuid :
this update makes database management more robust and handle better intraction with front and back of AI modules