Islam AbdelRahman d4b0ac2760 Fix CompactFiles() bug when used with CompactionFilter using SuperVersion
Summary:
GetAndRefSuperVersion() should not be called again in the same thread before ReturnAndCleanupSuperVersion() is called.

If we have a compaction filter that is using DB::Get, This will happen
```
CompactFiles() {
  GetAndRefSuperVersion() // -- first call
    ..
    CompactionFilter() {
      GetAndRefSuperVersion() // -- second call
      ReturnAndCleanupSuperVersion()
    }
    ..
  ReturnAndCleanupSuperVersion()
}
```

We solve this issue in the same way Iterator is solving it, but using GetReferencedSuperVersion()

This was discovered in https://github.com/facebook/mysql-5.6/issues/427 by alxyang
Closes https://github.com/facebook/rocksdb/pull/1803

Differential Revision: D4460155

Pulled By: IslamAbdelRahman

fbshipit-source-id: 5e54322
2017-02-02 16:16:47 -08:00
..
2016-11-21 12:24:13 -08:00
2016-11-19 14:24:12 -08:00
2017-01-03 18:39:14 -08:00
2017-01-03 18:39:14 -08:00
2017-01-08 14:24:12 -08:00
2017-01-08 14:24:12 -08:00
2017-01-08 14:24:12 -08:00
2017-01-08 14:24:12 -08:00
2016-11-04 12:09:22 -07:00
2017-01-20 11:15:38 -08:00
2016-12-22 13:09:19 -08:00
2017-01-03 17:54:12 -08:00
2017-01-09 15:54:12 -08:00
2016-11-10 11:09:22 -08:00
2016-12-19 16:54:12 -08:00
2016-07-08 17:50:51 -07:00
2016-10-13 08:48:40 -07:00
2016-07-08 17:50:51 -07:00
2016-11-03 18:54:20 -07:00
2017-01-08 14:24:12 -08:00
2017-01-08 14:24:12 -08:00
2016-12-29 15:54:19 -08:00
2016-11-19 14:24:12 -08:00
2016-09-27 18:20:57 -07:00
2016-09-27 18:20:57 -07:00
2016-07-13 15:36:22 -07:00
2017-01-08 14:24:12 -08:00
2016-11-21 18:09:13 -08:00