Skip to content
This repository was archived by the owner on May 21, 2026. It is now read-only.
This repository was archived by the owner on May 21, 2026. It is now read-only.

Table columns for line numbers in the source table are defaulting to limit: 4 instead of limit: 8 #191

Open

Description

@will3216

First off, this gem is awesome and a great tool! I am running into an issue when parsing a log file that is 3.5gb though, and when DatabaseInserter.new.source_change([..]) gets called, it hits a database column limitation.

/gems/activerecord-4.2.4/lib/active_record/type/integer.rb:45:in `ensure_in_range': 3461277784 is out of range for ActiveRecord::Type::Integer with limit 4 (RangeError)

Maybe you should explicitly set the limit to 8? It seems as though its trying to store it as a 4byte integer, but should really be stored as an 8 byte integer.

in /request-log-analyzer/lib/request_log_analyzer/database/source.rb

class RequestLogAnalyzer::Database::Source < RequestLogAnalyzer::Database::Base
  def self.create_table!
    unless database.connection.table_exists?(:sources)
      database.connection.create_table(:sources) do |t|
        t.column :filename, :string
        t.column :mtime,    :datetime
        t.column :filesize, :integer, limit: 8
      end
    end
  end
end

Activity

  1. changed the title [-]Table columns that reference line numbers are stored as integer instead of bigint[/-] [+]Table columns for line numbers in the source table are defaulting to limit: 4 instead of limit: 8[/+] on Sep 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions