@@ -564,27 +564,11 @@ func (k prettyInternalKey) Format(s fmt.State, c rune) {
564564}
565565
566566// ParseInternalKey parses the string representation of an internal key. The
567- // format is <user-key>#<seq-num>,<kind>. The older format
568- // <user-key>.<kind>.<seq-num> is also supported (for now).
567+ // format is `<user-key>#<seq-num>,<kind>`.
569568//
570569// If the seq-num starts with a "b" it is marked as a batch-seq-num (i.e. the
571570// SeqNumBatchBit bit is set).
572571func ParseInternalKey (s string ) InternalKey {
573- if ! strings .Contains (s , "#" ) {
574- // Parse the old format: <user-key>.<kind>.<seq-num>
575- // TODO(radu): get rid of this.
576- x := strings .Split (s , "." )
577- if len (x ) != 3 {
578- panic (fmt .Sprintf ("invalid internal key %q" , s ))
579- }
580- ukey := x [0 ]
581- kind , ok := kindsMap [x [1 ]]
582- if ! ok {
583- panic (fmt .Sprintf ("unknown kind: %q" , x [1 ]))
584- }
585- seqNum := ParseSeqNum (x [2 ])
586- return MakeInternalKey ([]byte (ukey ), seqNum , kind )
587- }
588572 sep1 := strings .Index (s , "#" )
589573 sep2 := strings .Index (s , "," )
590574 if sep1 == - 1 || sep2 == - 1 || sep2 < sep1 {
0 commit comments