Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-82618

Replace usages of absl::hash_internal

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Server Programmability

      In some places where we want a modern hash, we use CityHash.

      The implementation we use is lifted from absl::hash_internal::CityHash and we use it in several places:

      https://github.com/search?q=repo%3Amongodb%2Fmongo%20absl%3A%3Ahash_internal&type=code

      abseil explicitly ask users not to depend on anything with the word internal in it: https://abseil.io/about/compatibility#c-symbols-and-files

      • Do not depend upon internal details. If something is in a namespace, file, directory, or simply contains the string internalimpltestdetailbenchmarksample, or example, unless it is explicitly called out, it is not part of the public API. It’s an implementation detail. You cannot friend it, you cannot include it, you cannot mention it or refer to it in any way.

      This may complicate stuff when we upgrade absl version and CityHash is replaced with some other hash function.

      If we want to use it, we have several options:

      1. We can use WiredTiger's implementation
      2. We can vendor CityHash separately (I am not sure if this is the best repo for it)
      3. We can consider switching to more modern hash function, like xxHash that uses SIMD.

            Assignee:
            Unassigned Unassigned
            Reporter:
            ivan.fefer@mongodb.com Ivan Fefer
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: