0
0
Fork 0
Commit Graph

4 Commits

Author SHA1 Message Date
Marty Schoch 2332455bd2 nicer formatting of license header 2016-10-02 10:13:14 -04:00
Steve Yen 004e157963 field cache also tracks fieldIndex -> fieldName reverse mapping 2016-10-01 13:06:03 -07:00
Marty Schoch cf67fe2cbc fix major synchronization issue in the field_cache
The field cache is expected to be the authority on which field
names are identified by which identifier.  This code was
optimized for the most common case in which fields already
exist.  However, if we deterimine the field is missing with
the read lock (shared), we incorrectly immediately proceed
to create a new row with the write lock (exclusive).  The
problem is that multiple goroutines might have come to
the same conclusion, and they all proceed to add rows.  The two
choices were to do the whole operation with the write lock, or
recheck the value again with the write lock.  We have chosen
to repeat the check inside the write-lock, as this optimizes
for what we believe to be the most common case, in which most
fields will already exist.
2015-12-15 16:39:38 -05:00
Marty Schoch 84811cf5a0 made index type configurable + first version of firestorm 2015-08-25 14:52:42 -04:00